Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] python problem starting calibre
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 277
Location: Seattle

PostPosted: Fri Jun 16, 2017 7:48 am    Post subject: [SOLVED] python problem starting calibre Reply with quote

I've totally rebuilt calibre with all deps and even downgraded to stable with the same problem occurring. When I google I'm only finding bits of code and nothing that seems related.
Code:
 $ calibre
Traceback (most recent call last):
  File "/usr/bin/calibre", line 20, in <module>
    sys.exit(calibre())
  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, in <module>
    from .tz import *
  File "/usr/lib64/python2.7/site-packages/dateutil/tz/tz.py", line 23, in <module>
    from ._common import tzname_in_python2, _tzinfo, _total_seconds
  File "/usr/lib64/python2.7/site-packages/dateutil/tz/_common.py", line 2, in <module>
    from six.moves import _thread
ImportError: cannot import name _thread
Any suggestions?

Last edited by roki942 on Tue Sep 05, 2017 8:41 am; edited 3 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19650
Location: here

PostPosted: Fri Jun 16, 2017 9:25 am    Post subject: Reply with quote

You have tried to recompile dev-python/python-dateutil?
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 277
Location: Seattle

PostPosted: Fri Jun 16, 2017 10:07 am    Post subject: Reply with quote

Thanks for the suggestion. I went ahead and rebuilt it
Code:
Calculating dependencies... done!
[ebuild   R   ~] dev-python/python-dateutil-2.6.0::gentoo  PYTHON_TARGETS="python2_7 python3_4 -pypy -pypy3 -python3_5 -python3_6" 0 KiB
and still getting the same output. Is there some python updater or repair tool I should be trying?
Back to top
View user's profile Send private message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 277
Location: Seattle

PostPosted: Sat Jun 17, 2017 12:43 am    Post subject: Reply with quote

fedeliallalinea
The cause turns out to be dev-python/python-dateutil 2.6.0. Downgraded to 2.4.2-r1 and calibre starts just fine.

Created a bug report: https://bugs.gentoo.org/show_bug.cgi?id=621988

Thanks for pointing me in the right direction>
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19650
Location: here

PostPosted: Sat Jun 17, 2017 5:50 am    Post subject: Reply with quote

roki942 wrote:
The cause turns out to be dev-python/python-dateutil 2.6.0. Downgraded to 2.4.2-r1 and calibre starts just fine.

Strange, I have calibre 2.85.1 and dev-python/python-dateutil-2.6.0 and in my system work fine
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 277
Location: Seattle

PostPosted: Sun Jun 18, 2017 7:27 pm    Post subject: Reply with quote

fedeliallalinea wrote:
roki942 wrote:
The cause turns out to be dev-python/python-dateutil 2.6.0. Downgraded to 2.4.2-r1 and calibre starts just fine.

Strange, I have calibre 2.85.1 and dev-python/python-dateutil-2.6.0 and in my system work fine

Seems I went off half-cocked ..... calibre 2.78.0(stable) and 2.80.0 will use python-dateutil 2.4.2-r1 but calibre 2.83.0 - 2.85.1 pulls in python-dateutil 2.6.0
I tried the downgrading python-dateutil after I went to stable calibre and didn't emerge the newer versions.

Is becoming an experienced python programer the only way to debugs things like this?
Back to top
View user's profile Send private message
chair-raver
n00b
n00b


Joined: 13 Jan 2007
Posts: 25
Location: Paderborn, Germany

PostPosted: Mon Jun 26, 2017 4:26 pm    Post subject: Found the problem, at least on my setup. Reply with quote

This has plaguing for some time now. My fix was to mask newer version of python-dateutil. However the new calibre has a dependency for 2.6 defined.

So here is what I did to fix my problem:

Execute find command:

Code:

# find / -mount -name six.pyc
/usr/lib64/calibre/six.pyc                                                                           
/usr/lib64/python2.7/site-packages/ecdsa/six.pyc                                                     
/usr/lib64/python2.7/site-packages/six.pyc                                                           
/usr/lib64/python2.7/site-packages/pkg_resources/_vendor/six.pyc                                     
/usr/lib64/python2.7/site-packages/M2Crypto/six.pyc                                                 
/usr/lib64/python2.7/site-packages/feedgenerator/django/utils/six.pyc
/usr/lib64/python2.7/site-packages/paver/deps/six.pyc
/usr/lib64/python2.7/site-packages/urllib3/packages/six.pyc
/usr/lib64/python2.7/site-packages/ansible/module_utils/six.pyc
/usr/lib64/python2.7/site-packages/pip/_vendor/six.pyc
/usr/lib64/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.pyc


Then another find with equery:

Code:

# for i in $(find / -mount -name six.pyc); do equery b $i ; done
 * Searching for /usr/lib64/calibre/six.pyc ...
 * Searching for /usr/lib64/python2.7/site-packages/ecdsa/six.pyc ...
dev-python/ecdsa-0.13 (/usr/lib64/python2.7/site-packages/ecdsa/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/six.pyc ...
dev-python/six-1.10.0 (/usr/lib64/python2.7/site-packages/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/pkg_resources/_vendor/six.pyc ...
dev-python/setuptools-36.0.1 (/usr/lib64/python2.7/site-packages/pkg_resources/_vendor/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/M2Crypto/six.pyc ...
dev-python/m2crypto-0.26.0 (/usr/lib64/python2.7/site-packages/M2Crypto/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/feedgenerator/django/utils/six.pyc ...
dev-python/feedgenerator-1.7 (/usr/lib64/python2.7/site-packages/feedgenerator/django/utils/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/paver/deps/six.pyc ...
dev-python/paver-1.2.4 (/usr/lib64/python2.7/site-packages/paver/deps/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/urllib3/packages/six.pyc ...
dev-python/urllib3-1.21.1 (/usr/lib64/python2.7/site-packages/urllib3/packages/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/ansible/module_utils/six.pyc ...
app-admin/ansible-2.3.1.0 (/usr/lib64/python2.7/site-packages/ansible/module_utils/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/pip/_vendor/six.pyc ...
dev-python/pip-9.0.1-r2 (/usr/lib64/python2.7/site-packages/pip/_vendor/six.pyc)
 * Searching for /usr/lib64/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.pyc ...
dev-python/pip-9.0.1-r2 (/usr/lib64/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.pyc)


Only /usr/lib64/calibre/six.pyc had no package associated. And voila, removing this file fixed it for me. How I got to this particular file is beyond me.

Anyway, hope this helps.
Back to top
View user's profile Send private message
iandoug
Guru
Guru


Joined: 11 Feb 2005
Posts: 493
Location: Cape Town, South Africa

PostPosted: Tue Jul 04, 2017 7:31 am    Post subject: Re: Found the problem, at least on my setup. Reply with quote

chair-raver wrote:
This has plaguing for some time now. My fix was to mask newer version of python-dateutil. However the new calibre has a dependency for 2.6 defined.
So here is what I did to fix my problem:


Thanks a mill, also worked here.

I submitted a bug to the Calibre guys but they said it was not a Calibre issue but a distro issue.

Cheers, Ian
_________________
Asus Sabertooth P990, AMD FX-8150, GeForce GTX 560, 16GB Ram | Asus M3A78 64, X2 6000+, PX9800 GT, 4GB Ram | Asus M4A77TD PRO, X2 245, HD4350, 4GB RAM
Back to top
View user's profile Send private message
roki942
Apprentice
Apprentice


Joined: 18 Apr 2005
Posts: 277
Location: Seattle

PostPosted: Tue Sep 05, 2017 8:40 am    Post subject: Re: Found the problem, at least on my setup. Reply with quote

chair-raver wrote:

Only /usr/lib64/calibre/six.pyc had no package associated. And voila, removing this file fixed it for me.


Sorry for my long delay.
That also fixed it for me. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum