Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"AttributeError: 'NoneType' object has no attribute 'strftime'" error #4

Closed
SR-G opened this issue Sep 5, 2021 · 1 comment
Closed

Comments

@SR-G
Copy link

SR-G commented Sep 5, 2021

While using the latest plex2letterboxd code, under linux, with an up-to-date PLEX server, i sometimes encounter this error (not on all libraries - some are working fine, some are failing) :

16:38 sergio@solaris ~/plex2letterboxd% time python -m plex2letterboxd --ini config.ini --sections "Séries - TV" --output letterboxd-series.csv
Traceback (most recent call last):
  File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/users/sergio/plex2letterboxd/plex2letterboxd/__main__.py", line 4, in <module>
    plex2letterboxd.main()
  File "/home/users/sergio/plex2letterboxd/plex2letterboxd/plex2letterboxd.py", line 61, in main
    write_csv(sections, args.output)
  File "/home/users/sergio/plex2letterboxd/plex2letterboxd/plex2letterboxd.py", line 45, in write_csv
    date = movie.lastViewedAt.strftime('%Y-%m-%d')
AttributeError: 'NoneType' object has no attribute 'strftime'
python -m plex2letterboxd --ini config.ini --sections "Séries - TV" --output  2.14s user 0.04s system 6% cpu 34.920 total

To be noted : the code is running fine for several items, but then at some point (here after 150 entries) i encounter one item that is generating this issue - would be interesting if the item name was somehow displayed / identifiable.

@mtimkovich
Copy link
Owner

The cause of this seems to be some watched movies not having lastViewedAt set. Should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants