UnicodeEncodeError on start due to store StoreChitankaStore name value

Bug #815224 reported by Eric DUprey on 2011-07-23
This bug affects 3 people
Affects Status Importance Assigned to Milestone

Bug Description

Calibre 0.8.11 fails to start on OpenBSD Slackware Linux due to UnicodeEncodeError exception apparently caused by extended characters in the name of StoreChitankaStore in /usr/lib/calibre/calibre/customize/builtins.py:1194

Error is:

  File "/usr/local/lib/calibre/calibre/gui2/store/__init__.py", line 56, in __init__
    self.config = JSONConfig('store/stores/' + self.name)
  File "/usr/local/lib/calibre/calibre/utils/config.py", line 241, in __init__
  File "/usr/local/lib/calibre/calibre/utils/config.py", line 251, in refresh
    if os.path.exists(self.file_path):
  File "/usr/local/lib/python2.7/genericpath.py", line 18, in exists
UnicodeEncodeError: 'ascii' codec can't encode characters in position 39-43: ordinal not in range(128)

See http://pastie.org/2258651

Offending code appears to be:

class StoreChitankaStore(StoreBase):
    name = u'Ð.оÑ.Ñ.а библиоÑ.ека'
    author = 'Alex Stanev'
    description = u'Ð.езавиÑ.им Ñ.айÑ. за DRM Ñ.вободна лиÑ.еÑ.аÑ.Ñ.Ñ.а на бÑ.лгаÑ.Ñ.ки език'
    actual_plugin = 'calibre.gui2.store.stores.chitanka_plugin:ChitankaStore'

I was able to resolve the issue on my installation by disabling this store plugin by commneting the line



plugins += [

In the file /usr/lib/calibre/calibre/customize/builtins.py line 1479.

After disabling this store, Calibre starts and runs normally for me.

I experienced this problem on Slackware 13.37 (which I had upgraded Python and various libraries to support calibre) and others reported in the IRC channel reported this issue on OpenBSD and Debian, but apparently OSX is unaffected.

Related branches

Fixed in branch lp:calibre. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
Rinaldi J. Montessi (rinaldij) wrote :

Is there any way Joe User can get around this? I have tried --ignore-plugins to no avail.

Wait for the next release which will be on Friday, or revert to the last release.
Previous releases of calibre are available on sourceforge, download the tarball and
extract it into /opt/calibre to overwrite the current install.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers