"char buffer type not available" error while gunzip

I

Istvan Gouritz

Hello!

I'm getting exception while trying to gunzip data, which is stored in
db:
File "helper.py", line 33, in gunzip
f = StringIO(data)
"exceptions.TypeError: char buffer type not available"

function which does gunzipping:
def gunzip(s):
print type(data)) #prints <type 'buffer'>
f = StringIO(s)
gzipped = gzip.GzipFile(fileobj=f)
return gzipped.read()

It's weird, because it does not happen every time.
Thanks a lot for any help!

Istvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top