Traceback (most recent call last):
File "/usr/bin/calibre", line 20, in <module>
File "/usr/lib64/calibre/calibre/gui_launch.py", line 69, in calibre
from calibre.gui2.main import main
File "/usr/lib64/calibre/calibre/gui2/__init__.py", line 21, in <module>
from calibre.utils.date import UNDEFINED_DATE
File "/usr/lib64/calibre/calibre/utils/date.py", line 15, in <module>
from calibre.utils.iso8601 import utc_tz, local_tz, UNDEFINED_DATE
File "/usr/lib64/calibre/calibre/utils/iso8601.py", line 9, in <module>
from dateutil.tz import tzlocal, tzutc, tzoffset
File "/usr/lib64/python2.7/site-packages/dateutil/tz/__init__.py", line 1,<module>
from .tz import *
File "/usr/lib64/python2.7/site-packages/dateutil/tz/tz.py", line 23, in <le>
from ._common import tzname_in_python2, _tzinfo, _total_seconds
File "/usr/lib64/python2.7/site-packages/dateutil/tz/_common.py", line 2, module>
from six.moves import _thread
ImportError: cannot import name _thread
Downgraded to 2.4.2-r1 and calibre opens
Thank you for your report, please add which versions are affected.
Also fix the subject line accordingly, please.
calalibre 2.83.0 thru 2.85.1 pull in python-dateutil-2.6.0 which all fail to open as in the 1st comment
(In reply to Michael Rokicki from comment #0)
> from calibre.utils.iso8601 import utc_tz, local_tz, UNDEFINED_DATE
> File "/usr/lib64/calibre/calibre/utils/iso8601.py", line 9, in <module>
> from dateutil.tz import tzlocal, tzutc, tzoffset
> File "/usr/lib64/python2.7/site-packages/dateutil/tz/__init__.py", line
> from .tz import *
> File "/usr/lib64/python2.7/site-packages/dateutil/tz/tz.py", line 23, in
> from ._common import tzname_in_python2, _tzinfo, _total_seconds
> File "/usr/lib64/python2.7/site-packages/dateutil/tz/_common.py", line 2,
> from six.moves import _thread
> ImportError: cannot import name _thread
This indicates a problem with the python-dateutil package. It could be a bug in the package or just an incorrect dependency.
The offending "from six.moves import _thread" code was removed in this commit (2.6.0-20-g9082c80):
This change has not been tagged in a release.
This test case succeeds for me with dev-python/six-1.10.0:
python2.7 -c 'from six.moves import _thread'
What version of dev-python/six do you have?
I have seen this behavior before when the user has installed an older version of six using pip. This conflicts with the newer six installed by portage.
I suggest running the following commands to cleanup orphaned files from the python six package:
rm -r /usr/lib64/python*/site-packages/six*
emerge --oneshot dev-python/six
I'm very sorry for the long delay in posting this.
The solution was to delete /usr/lib64/calibre/six.pyc which had no package associated.
Figured out by chair-raver in https://forums.gentoo.org/viewtopic-t-1064862-highlight-.html
From the linked forum thread, this looks like a calibre problem. Didn't calibre had this very bad idea of requiring the setuid flag at some point? Maybe that this is what causes stray "six.pyc" files in /usr/lib.
I'll let calibre maintainers decide what to do with this.
Like bug 622728, this may have been triggered by someone using upstream's "Binary install" method: