Giter Site home page Giter Site logo

Comments (6)

Captain-Wiggles avatar Captain-Wiggles commented on May 31, 2024

I realized, that Trakt is probably not updating because it is not authorized. However, i'm not sure where i should be inputting the one time pin to authorize the app i created following the steps.

Also i found the windows equivalent for "grep" to be "findstr". Listing it out for any future readers who are not familiar like myself.

from netflix-to-trakt-import.

jensb89 avatar jensb89 commented on May 31, 2024

Okay, so for the Trakt authorization you need to fill in the API Key and Api Secret in the config.py, have you done this already?

It's this part:
TRAKT_API_CLIENT_ID = ""
TRAKT_API_CLIENT_SECRET = ""

Then, once the movies and tv shows are identified the script opens the Trakt connection. As far as I remember, If it's not authorized yet, it will show an URL on the console that you have to open in your web browser.
There, you have to click something like "Authorize" to authorize the script to interact with your trakt account.

After that (still in the web browser) the code should be shown.
The console is waiting for you to insert that code into the console and press enter (it should also say something like "waiting for code" or something similar)

.... however, looking at your error message it seems the script has not even reached the Trakt authorization part. It fails at res = tmdbMovie.search(movie.name)
This means it gets all tv shows, but for some specific movie it can't find the TMDB info and generates an error and thus nothing is sent to trakt.

What you could try:
after the line "for movie in netflixHistory.movies:" (

for movie in netflixHistory.movies:
) add a print(movie) command to identify the movie that causes this problem. Would be interesting to know for a future fix :)

Alternatively:
Check your log for the last message of the form: "Found movie ..."
Then, manually open your csv file and search for the next movie after that one and delete the line.

If you have identified the movie, please comment it here, then I will have a look why it fails as soon as I find some time.
But once you delete it from the csv file the script should run through.

I will think of a bugfix for the script to continue after such an error.

from netflix-to-trakt-import.

jensb89 avatar jensb89 commented on May 31, 2024

Also: Could it be that there is a blank line without any movie name in your csv file? The error "['query must be provided']" indicates the movie name might be an empty string?!

from netflix-to-trakt-import.

Captain-Wiggles avatar Captain-Wiggles commented on May 31, 2024

Yep, I had the client ID and secrets all edited.

I followed through everything and found the culprit. It was exactly as you said, in the .csv there were two rows with blank cells (but filled date).

I deleted those, ran the script and it ran through to the authentication portion. After authenticating, it failed at adding to Trakt.

On the csv file, I did notice that the date column only has the actual date (I.e. 2021-12-12) and no hours:minutes. I'm assuming this is the culprit. I'm guessing I can just convert the date format to "yyyy-mm-dd h:mm" via excel and it'll work. I assumed once it's imported there's no undoing so I'd like to ask if your .csv downloads included the hours:minutes before doing so. I assume there must've been a reason for you to include that specification.

# Set the datetime format of the csv file (default: %d.%m.%y for 05.02.21)
# Use %Y-%m-%d for 2021-02-05 (Canada, ...)
CSV_DATETIME_FORMAT = "%Y-%m-%d"

Traceback (most recent call last): File "C:\Program Files\Netflix-to-Trakt-Import\netflix2trakt.py", line 164, in <module> time = datetime.datetime.strptime(watchedTime + ' 20:15', config.CSV_DATETIME_FORMAT + ' %H:%M') File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\_strptime.py", line 568, in _strptime_datetime tt, fraction, gmtoff_fraction = _strptime(data_string, format) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2800.0_x64__qbz5n2kfra8p0\lib\_strptime.py", line 349, in _strptime raise ValueError("time data %r does not match format %r" % ValueError: time data '2022.01.07 20:15' does not match format '%Y-%m-%d %H:%M'

from netflix-to-trakt-import.

jensb89 avatar jensb89 commented on May 31, 2024

Great, one step closer :)

The time is not needed as it's added by the script. My Netflix csv also has no time infos.

Try setting the Datestring with . instead of -. For example ""%Y.%m.%d or similar. Internally it's converted to - signs, but maybe it's expecting a . as Input. I can look in the code later.

from netflix-to-trakt-import.

Captain-Wiggles avatar Captain-Wiggles commented on May 31, 2024

So I finally got a change to implement the "." change you suggested and it worked!

Thank you so much :)

from netflix-to-trakt-import.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.