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

ValueError: Invalid isoformat #66

Closed cnstudios closed 1 year ago

cnstudios commented 1 year ago

Is there already an issue for your problem?

Bug Description

Ran the script for the first time and processing was complete. However with the following error saying there's something wrong with the date format:

c:>IMDBTraktSyncer Starting webdriver... Successfully signed in to IMDB Processing Trakt Data Processing Trakt Data Complete Processing IMDB Data Processing IMDB Data Complete

--- 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...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\IMDBTraktSyncer\IMDBTraktSyncer.py", line 153, in main imdb_date_added = datetime.fromisoformat(imdb_rating['Date_Added']) ValueError: Invalid isoformat string: '2017-06-20T00:00:00.000Z'

Environment

OS: Windows 10 PIP install method: yes Version: 1.7.5

Screenshots

No response

RileyXX commented 1 year ago

I believe this issue might be due to an old python version. If you could, try updating to the latest Python version 3.11 https://www.python.org/downloads/. Just download the installer, run it then choose upgrade when prompted. Make sure to tick the box for adding Python to your PATH variable during install.

Once installed try running the script again and see if that resolves it.

This should be an easy fix otherwise, I will work on an update soon that should hopefully resolve this for older Python versions.

cnstudios commented 1 year ago

Thanks, I tried to update and indeed resolved my issue. :-)

RileyXX commented 1 year ago

Thanks for confirming!

keldian commented 1 year ago

Encountering this as well. Ubuntu 22.04 doesn't offer Python 3.11 from its repos, and I don't want to force an install for fear of instability. Perhaps consider a Docker implementation of this project as a workaround for issues like this?

RileyXX commented 1 year ago

Encountering this as well. Ubuntu 22.04 doesn't offer Python 3.11 from its repos

Hi thanks for reporting the issue you're having on Ubuntu. The latest patch for v1.8.2 should hopefully resolve this error on older Python versions. If you could please give it a try and let me know if it fixes this error for you.

You can update to the latest version using the following:

python -m pip install IMDBTraktSyncer --upgrade
keldian commented 1 year ago

Yes, the error went away and the sync items were processed successfully. Thank you

RileyXX commented 1 year ago

Yes, the error went away and the sync items were processed successfully. Thank you

That's good to know thanks for confirming!