Press "Enter" to skip to content

Posts published in May 2013

URL GET vars to PHP Array

Sometimes you will need to retrieve the GET variables passed into the current page URI or you will have a URL string to work from which contains certain GET variables, the below method helps a lot to convert them into an array which you can easily manipulate later. [code lang=”php”]…

python "AttributeError: ZipFile instance has no attribute '__exit__"

This is actually a very easy error to fix, eventhough off the bat it seems a lot more involved. You probably have syntax something like this: [code lang=”python”] with zipfile.ZipFile(wr_zip) as zipfd: extract(zipfd, wr_csv, wr_csv) [/code] So instead we will change it to this: [code lang=”python”] zipfd = zipfile.ZipFile(wr_zip) extract(zipfd,…

python "AttributeError: ZipFile instance has no attribute '__exit__"

This is actually a very easy error to fix, eventhough off the bat it seems a lot more involved. You probably have syntax something like this: [code lang=”python”] with zipfile.ZipFile(wr_zip) as zipfd: extract(zipfd, wr_csv, wr_csv) [/code] So instead we will change it to this: [code lang=”python”] zipfd = zipfile.ZipFile(wr_zip) extract(zipfd,…