tvnamer icon indicating copy to clipboard operation
tvnamer copied to clipboard

KeyError: u'seasonnumber'

Open weedy opened this issue 13 years ago • 3 comments

Existing filename is correct: [Taka] Naruto Shippuuden - 262 - War Begins [4B93BD6A].mp4
####################
Traceback (most recent call last):
  File "/usr/bin/tvnamer-2.7", line 9, in <module>
    load_entry_point('tvnamer==2.2.1', 'console_scripts', 'tvnamer')()
  File "/usr/lib64/python2.7/site-packages/tvnamer/main.py", line 416, in main
    tvnamer(paths = sorted(args))
  File "/usr/lib64/python2.7/site-packages/tvnamer/main.py", line 323, in tvnamer
    processFile(tvdb_instance, episode)
  File "/usr/lib64/python2.7/site-packages/tvnamer/main.py", line 243, in processFile
    newPath = getMoveDestination(episode)
  File "/usr/lib64/python2.7/site-packages/tvnamer/main.py", line 75, in getMoveDestination
    'originalfilename': episode.originalfilename,
KeyError: u'seasonnumber'

weedy avatar Oct 02 '12 01:10 weedy

I think this is caused by this bug - certain episode types don't get all episode data - the Anime-episode-info class doesn't currently get season number

I'll try and fix this soon..

dbr avatar Oct 02 '12 08:10 dbr

dot dot dot

weedy avatar Nov 12 '12 02:11 weedy

temporary (ugly) fix: https://github.com/averissimo/tvnamer/commit/6581d66cb0c3876aec8c0c768f0b2794b4569b21

basically it defaults the season number to 0 for these cases

averissimo avatar Apr 30 '13 23:04 averissimo