#9782: 'utf8' codec can't decode byte 0x97 in position 11: unexpected code byte
---------------------------+------------------------------------------------
 Reporter:  akash          |       Owner:  nobody    
   Status:  new            |   Milestone:            
Component:  Uncategorized  |     Version:  1.0       
 Keywords:                 |       Stage:  Unreviewed
Has_patch:  0              |  
---------------------------+------------------------------------------------
 UnicodeDecodeError at /mysite/download/zip/123/

 'utf8' codec can't decode byte 0x97 in position 11: unexpected code byte

 Request Method:         POST
 Request URL:    http://IP/mysite/download/zip/123/
 Exception Type:         UnicodeDecodeError
 Exception Value:

 'utf8' codec can't decode byte 0x97 in position 11: unexpected code byte

 Exception Location:     /usr/lib/python2.4/zipfile.py in FileHeader, line
 166
 Python Executable:      /usr/bin/python
 Python Version:         2.4.3
 Python Path:    ['/var/opt/project', '/usr/lib/python2.4/site-packages
 /pytz-2006p-py2.4.egg', '/usr/lib/python2.4/site-
 packages/simplejson-1.4-py2.4.egg', '/usr/lib/python2.4/site-
 packages/pydot-1.0.2-py2.4.egg', '/usr/lib/python24.zip',
 '/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2',
 '/usr/lib/python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload',
 '/usr/lib/python2.4/site-packages', '/usr/lib/python2.4/site-
 packages/Numeric', '/usr/lib/python2.4/site-packages/PIL',
 '/usr/lib/python2.4/site-packages/gtk-2.0', '/usr/lib/python2.4/site-
 packages/setuptools-0.6c1-py2.4.egg']
 Server time:    Tue, 9 Dec 2008 18:57:47 +0530

 Unicode error hint
 The string that could not be encoded/decoded was:  �7��9���


 header  :
 
'PK\x03\x04\x14\x00\x00\x00\x08\x007\x97\x899\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11\x00\x00\x00'


 I am trying to zip a folder and getting the above error.

 ##Sample Code
 zp = zipfile.ZipFile(zip_path, "w")
 for name in glob.glob(path_till_title + "/*"):
     zp.write(name, os.path.basename(name), zipfile.ZIP_DEFLATED)
 zp.close()

 while doing the same from command line it works.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9782>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to