View Single Post
Old 07-31-2013, 11:05 AM   #12
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
Apologies for "reopening" this, but it seems to be a problem with zipfile lib in Python 2.7.4.

Indeed, on my Windows box, running latest Calibre 0.9.41, 32bit, I get:

Code:
character mapping must return integer, None or unicode

Traceback (most recent call last):
  ...
  File "zipfile.py", line 1036, in extractall
  File "zipfile.py", line 1024, in extract
  File "zipfile.py", line 1057, in _extract_member
TypeError: character mapping must return integer, None or unicode
when I call zipfile.extractall() in my code.

In debug mode, Calibre says it is running with Python 2.7.4 (in Windows). I guess this behavior is related to this bug: http://bugs.python.org/issue17656

That's why reverting to a previous version of Calibre, running with Python 2.7.3, seems to fix the issue.

On my Debian machine, running Calibre 0.9.31 with Python 2.7.5+, no exception is raised as well.

I am not familiar with Calibre building, is there a way of "forcing" Calibre to use Python 2.7.5 (installed on system) instead of Python 2.7.4? Or are the libs statically "built-in" the Windows package? Also, "updating" Calibre to Python 2.7.5 should solve the issue altogether.
AlPe is offline   Reply With Quote