Taxel / PlexTraktSync

A python script that syncs the movies, shows and ratings between trakt and Plex (without needing a PlexPass or Trakt VIP subscription)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Something broken in latest version.

twhiting9275 opened this issue · comments

Trying to get this working on Windows 10 (python 3.8). Unfortunately, no dice. Downloaded from Github, and latest version

D:\pts>C:\Python38\python.exe -m plextraktsync
Traceback (most recent call last):
  File "C:\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "D:\pts\plextraktsync\__main__.py", line 18, in <module>
    cli()
  File "C:\Python38\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python38\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Python38\lib\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
  File "C:\Python38\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python38\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Python38\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "D:\pts\plextraktsync\cli.py", line 53, in cli
    sync()
  File "C:\Python38\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Python38\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Python38\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Python38\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "D:\pts\plextraktsync\cli.py", line 24, in wrap
    module = importlib.import_module(f".commands.{name}", package=__package__)
  File "C:\Python38\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "D:\pts\plextraktsync\commands\sync.py", line 5, in <module>
    from plextraktsync.commands.login import ensure_login
  File "D:\pts\plextraktsync\commands\login.py", line 5, in <module>
    from plextraktsync.commands.trakt_login import (has_trakt_token,
  File "D:\pts\plextraktsync\commands\trakt_login.py", line 10, in <module>
    from plextraktsync.trakt_api import TraktApi
  File "D:\pts\plextraktsync\trakt_api.py", line 7, in <module>
    import trakt.movies
  File "C:\Python38\lib\site-packages\trakt\movies.py", line 4, in <module>
    from trakt.core import Alias, Comment, Genre, get, delete
ImportError: cannot import name 'Alias' from 'trakt.core' (C:\Python38\lib\site-packages\trakt\core\__init__.py)

D:\pts>

What's causing this?

  1. unsupported install method. installing from github is for developers.
  2. ignoring issue template, version info not supplied

you have conflicting trakt package installed, likely "trakt" or "trakt-py", pipx and docker installations isolate dependencies. we can not guarantee anything stable with other installation methods.

  1. unsupported install method. installing from github is for developers.
    Except the SAME issue appears with the Windows downloads
    Before closing issues automatically, get facts
  1. ignoring issue template, version info not supplied
    Again, get facts before closing issues. The version is the latest supported, when downloading from Windows and Github

No worries though, clearly you don't want to support your own code. That's a you thing. Stop blaming another package for your problems

A similar problem. Explain what's wrong here?

Windows PowerShell
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

Установите последнюю версию PowerShell для новых функций и улучшения! https://aka.ms/PSWindows

PS C:\Users\victo> plextraktsync
INFO PlexTraktSync [0.23.7]
INFO Sync Movie sections: [PlexLibrarySection:movie:Документальное, PlexLibrarySection:movie:Короткометражки,
PlexLibrarySection:movie:Фильмы]
INFO Sync Show sections: [PlexLibrarySection:show:Аниме, PlexLibrarySection:show:Сериалы]
INFO Downloaded List Alien 40th Anniversary Short Films
INFO Downloaded List Alien
INFO Downloaded List Scary-Movies
INFO Downloaded List Popular Horror
Processing Документальное 0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/5 [ 0:00:01 < -:--:-- , ? it/s ]
Traceback (most recent call last):
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\Scripts\plextraktsync.exe_main
.py", line 7, in
sys.exit(cli())
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\cli.py", line 53, in cli
sync()
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\cli.py", line 28, in wrap
cmd(*args, **kwargs)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\commands\sync.py", line 57, in sync
runner.sync(walker=w, dry_run=config.dry_run)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\sync.py", line 90, in sync
listutil.addPlexItemToLists(movie)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\trakt_list_util.py", line 97, in addPlexItemToLists
tl.addPlexItem(m.trakt, m.plex.item)
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\site-packages\plextraktsync\trakt_list_util.py", line 61, in addPlexItem
rank = self.trakt_items.get((trakt_item.media_type, trakt_item.trakt))
AttributeError: 'TraktList' object has no attribute 'trakt_items'
PS C:\Users\victo>

p.s. Your package supports pytrakt version 3.9 and 3.10 has already been released.

unsupported installation method means not supported. python ecosystem does not allow installing two packages to same namespace hence the error. it's been reported in the past and the fix is the same, remove conflicting package. and with pipx or docker such problem does not exist because of the isolation. both report trace indicates that you were not using supported installation methods.

also, pytrakt latest is 3.4.10:

it's pointless to continue discussing here further if you ignore the support rules set by the project.

aggression towards developers not tolerated at either. further posts on this issue will be ignored.

I didn't show aggression towards you, I just want a solution to my problem. Please explain to me how to remove one of the conflicting packages?, I am not very familiar with python, but I was interested in the functionality of your package to the services I am interested in.

the other user did. install PlexTraktSync package with pipx, see the project readme file. you have not shared details of your installation, can't support you.

the other user did. install PlexTraktSync package with pipx, see the project readme file. you have not shared details of your installation, can't support you.

How do I remove the installation of the pipix package and leave the installation of the package for Windows?

you should install with pipx, not the opposite:

you should install with pipx, not the opposite:

The same error with the installation using pipix. Now I do not know what to do and how to remove the packages associated with the installation for Windows?

Windows PowerShell
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

Установите последнюю версию PowerShell для новых функций и улучшения! https://aka.ms/PSWindows

PS C:\Users\victo> pipx install PlexTraktSync
installed package plextraktsync 0.23.7, installed using Python 3.10.7
These apps are now globally available
- plextraktsync.exe
done! ✨ 🌟 ✨
PS C:\Users\victo> plextraktsync
INFO PlexTraktSync [0.23.7]
INFO Sync Movie sections: [PlexLibrarySection:movie:Документальное, PlexLibrarySection:movie:Короткометражки,
PlexLibrarySection:movie:Фильмы]
INFO Sync Show sections: [PlexLibrarySection:show:Аниме, PlexLibrarySection:show:Сериалы]
INFO Downloaded List Alien 40th Anniversary Short Films
INFO Downloaded List Alien
INFO Downloaded List Scary-Movies
INFO Downloaded List Popular Horror
Processing Документальное 0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/5 [ 0:00:00 < -:--:-- , ? it/s ]
Traceback (most recent call last):
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\victo\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "c:\users\victo.local\bin\plextraktsync.exe_main
.py", line 7, in
sys.exit(cli())
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\cli.py", line 53, in cli
sync()
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\click\core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\cli.py", line 28, in wrap
cmd(*args, **kwargs)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\commands\sync.py", line 57, in sync
runner.sync(walker=w, dry_run=config.dry_run)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\sync.py", line 90, in sync
listutil.addPlexItemToLists(movie)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\trakt_list_util.py", line 97, in addPlexItemToLists
tl.addPlexItem(m.trakt, m.plex.item)
File "C:\Users\victo.local\pipx\venvs\plextraktsync\lib\site-packages\plextraktsync\trakt_list_util.py", line 61, in addPlexItem
rank = self.trakt_items.get((trakt_item.media_type, trakt_item.trakt))
AttributeError: 'TraktList' object has no attribute 'trakt_items'
PS C:\Users\victo>

@bulletproof2k: that seems different error than reported initially in this closed issue. create new bug report.