trakt / script.trakt

Trakt.tv movie and TV show scrobbler for Kodi
GNU General Public License v2.0
319 stars 149 forks source link

ImportError: cannot import name Trakt #473

Open pogman-code opened 5 years ago

pogman-code commented 5 years ago

Hi, First of all, I'm on linux, I'm running a fresh install of Kodi 18.3 and Trakt 3.2.4 (installed from Kodi repository)

But Trakt script won't run, the only lead I have is the following log entry:

ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
 - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.ImportError'>
Error Contents: cannot import name Trakt
Traceback (most recent call last):
  File "/home/adrian/.kodi/addons/script.trakt/default.py", line 6, in <module>
    from resources.lib.service import traktService
  File "/home/adrian/.kodi/addons/script.trakt/resources/lib/service.py", line 18, in <module>
    from resources.lib.traktapi import traktAPI
  File "/home/adrian/.kodi/addons/script.trakt/resources/lib/traktapi.py", line 8, in <module>
    from trakt import Trakt
ImportError: cannot import name Trakt
-->End of Python script error report<--

If anyone has any idea or lead :D

razzeee commented 5 years ago

Weird, just from that log, I would check if the dependencies got installed okay

dragonflyuk commented 4 years ago

I've just spent a full day re-installing and cleaning up Kodi install on my new dietpi box, because I was getting this error. It turns out I had installed a different trakt python package for one of my own python scripts, and that was interfering with the Trakt package the addon uses. Even once I'd found the problem I had to reinstall kodi for it to work correctly again. So maybe check what other packages you've installed recently if you come to this page searching for this error like I did.

gitthangbaby commented 2 years ago

i also have this issue in all trakt projects, as they use different trakt packages.. despite being installed as 2 separate packages, the import looks into each other files. Not nice.