iamkroot / trakt-scrobbler

Scrobbler for trakt.tv that supports VLC, Plex, MPC-HC, and MPV.
https://github.com/iamkroot/trakt-scrobbler/wiki
GNU General Public License v2.0
466 stars 30 forks source link

[BUG] Unhandled Expression "season" check log file #298

Closed abusayed0206 closed 5 months ago

abusayed0206 commented 6 months ago

Describe the bug

A clear and concise description of what the bug/error is.

Desktop (please complete the following information):

To Reproduce

Steps to reproduce the behavior: simply stopped working.

Log file

Click to see log contents

2024-05-22 14:24:23,744 - ERROR - backlog_cleaner - __init__ - Unhandled exception Traceback (most recent call last): File "C:\Python\Lib\threading.py", line 1073, in _bootstrap_inner self.run() File "C:\Python\Lib\threading.py", line 1431, in run self.function(*self.args, **self.kwargs) File "C:\Users\Sayed\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\backlog_cleaner.py", line 50, in clear if trakt.add_to_history(**item) is True: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Sayed\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\trakt_interface.py", line 149, in add_to_history history = prepare_history_data(watched_at, media_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Sayed\pipx\venvs\trakt-scrobbler\Lib\site-packages\trakt_scrobbler\trakt_interface.py", line 140, in prepare_history_data {'number': media_info['season'], 'episodes': [ ~~~~~~~~~~^^^^^^^^^^ KeyError: 'season'

I use the latest beta version. cause, regular version is not working for this issue. now, the beta version stopped working. But, when I try to monitor via cmd its working. WindowsTerminal_1of9LXpp6r

iamkroot commented 5 months ago

I guess something is wrong with your backlog file (see https://github.com/iamkroot/trakt-scrobbler/wiki/FAQs#what-happens-when-there-is-no-internet-connection for what it is), if you don't care about it, try deleting the watched_backlog.json file from https://github.com/iamkroot/trakt-scrobbler/wiki/FAQs#where-is-the-log-fileother-data-stored) and restart with trakts start -r.

Deleting the file will cause the scrobbler to forget some of the events that happened when trakt.tv wasn't reachable, so make sure you add those manually.

iamkroot commented 5 months ago

What does trakts backlog list give btw?

abusayed0206 commented 5 months ago

Sorry for delayed reply. AFK for few days for Eid Festival.

I'll check & provide update here soon.

Thanks for the tool.

abusayed0206 commented 5 months ago

after deleting the watched_backlog.json it's working perfectly. thanks champ🫡