RileyXX / IMDB-Trakt-Syncer

A python script that syncs user watchlist, ratings and reviews for Movies, TV Shows and Episodes both ways between Trakt and IMDB.
MIT License
90 stars 2 forks source link

cannot access local variable 'data' where it is not associated with a value #61

Closed Marius-Maximus closed 1 year ago

Marius-Maximus commented 1 year ago

Is there already an issue for your problem?

Bug Description

The Program did work several times. After the first error reinstallation did work. after the 2 time not anymore.

C:\Windows\System32>IMDBTraktsyncer No matching chromedriver-py version found for Chrome 115 Starting webdriver... Successfully signed in to IMDB Processing Trakt Data Processing Trakt Data Complete Processing IMDB Data Processing IMDB Data Complete No Trakt Watchlist Items To Set No IMDB Watchlist Items To Set Setting Trakt Ratings

--- ERROR --- An error occurred while running the script. Please submit the error to GitHub with the following information:

Traceback (most recent call last): File "C:\Users\Marius Zingg\AppData\Local\Programs\Python\Python311\Lib\site-packages\IMDBTraktSyncer\IMDBTraktSyncer.py", line 369, in main response = EH.make_trakt_request(rate_url, payload=data) ^^^^^^^^ UnboundLocalError: cannot access local variable 'data' where it is not associated with a value


Submit the error here: https://github.com/RileyXX/IMDB-Trakt-Syncer/issues/new?template=bug_report.yml

Environment

OS: Windows 11 / Chrome Browser pip installation: yes manual installation: no log.txt

Screenshots

No response

RileyXX commented 1 year ago

Hi thanks for reporting this. When running the script did it rate a few items and then fail at some point? I think this may have been due some items having unsupported media types from IMDB. I have made some changes in v1.7.2 which should hopefully resolve this issue.

You can upgrade to the latest version using the following:

python -m pip install IMDBTraktSyncer --upgrade

If you're still having this issue or you run into any other problems let me know and I'll take another look. Thanks!

RileyXX commented 1 year ago

Closing as completed. If you're still having this issue in the latest release let me know and I'll reopen this issue and investigate further. Thanks!