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

Crash because of lower key attribute #14

Closed
SDERAWI opened this issue Dec 13, 2010 · 5 comments
Closed

Crash because of lower key attribute #14

SDERAWI opened this issue Dec 13, 2010 · 5 comments

Comments

@SDERAWI
Copy link

SDERAWI commented Dec 13, 2010

Traceback (most recent call last):
  File "/usr/bin/tvnamer", line 9, in <module>
    load_entry_point('tvnamer==2.0', 'console_scripts', 'tvnamer')()
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 351, in main
    tvnamer(paths = sorted(args))
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 268, in tvnamer
    processFile(tvdb_instance, episode)
  File "/usr/lib/python2.7/site-packages/tvnamer/main.py", line 121, in processFile
    correctedSeriesName, epName = getEpisodeName(tvdb_instance, episode)
  File "/usr/lib/python2.7/site-packages/tvnamer/utils.py", line 52, in getEpisodeName
    show = tvdb_instance[episode.seriesname]
  File "/usr/lib/python2.7/site-packages/tvdb_api.py", line 772, in __getitem__
    key = key.lower() # make key lower case
AttributeError: 'NoneType' object has no attribute 'lower'
@dbr
Copy link
Owner

dbr commented Dec 13, 2010

What was the filename you ran it on?

@SDERAWI
Copy link
Author

SDERAWI commented Dec 13, 2010

Actually I ran it on a 2 Terabyte drive , so I don't know exactly which files cause a problem. Further more I did a "for i in ls ; do tvnamer -r * ; done" to make it go into each directory and the same crash occured in each directory.

@SDERAWI
Copy link
Author

SDERAWI commented Dec 13, 2010

I accidenatally hit "Comment and Close" in the previous comment instead of just "Comment"

@SDERAWI
Copy link
Author

SDERAWI commented Dec 13, 2010

I think one of the files is " /Seinfeld/S1E00 - The Pilot - Good News, Bad News.avi "

@dbr
Copy link
Owner

dbr commented Dec 30, 2010

Ohh, that explains it! Running it on a file named S1E00 blah.avi causes the same error.

This is a bug - the regex's match filenames without a series name, for use in other applications, but tvnamer can't use such filenames usefully, so it should either skip them, or prompt for a series name (although I want to handle filenames-without-series-names in a better way, as prompting for a series name would be annoying with multiple files, and couldn't work in batch mode)

Will fix this soon, thanks for letting me know!

This issue was closed.
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