Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > "char buffer type not available" error while gunzip

Reply
Thread Tools

"char buffer type not available" error while gunzip

 
 
Istvan Gouritz
Guest
Posts: n/a
 
      10-11-2010
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gzip - gunzip using zlib flebber Python 2 06-09-2007 05:46 PM
gunzip while downloading via ftp none Perl Misc 17 02-22-2006 11:16 PM
zlib.decompress cannot, gunzip can enrio@online.no Python 2 03-01-2005 08:31 AM
Re: how to gunzip a string ? Bill Loren Python 0 07-31-2003 09:11 AM
Re: how to gunzip a string ? Andreas Kuntzagk Python 0 07-31-2003 08:33 AM



Advertisments