dbr / tvnamer

Automatic TV episode file renamer, uses data from thetvdb.com via tvdb_api
https://pypi.python.org/pypi/tvnamer/
The Unlicense
911 stars 115 forks source link

TvdbAttributeNotFound #201

Closed 81322068 closed 3 years ago

81322068 commented 3 years ago

I am running a fresh install of tvnamer. Getting TvdbAttributeNotFound error while running >tvnamer "Flying Witch - S01E02.mkv"

>tvnamer "Flying Witch - S01E02.mkv"
####################
# Starting tvnamer
# Found 1 episode
####################
# Processing file: Flying Witch - S01E02.mkv
# Detected series: Flying Witch (season: 1, episode: 2)
TVDB Search Results:
1 -> Flying Witch [en] # http://thetvdb.com/?tab=series&id=300816 (default)
2 -> Flying with Byrd [en] # http://thetvdb.com/?tab=series&id=270832
3 -> Flying High with Charlie [en] # http://thetvdb.com/?tab=series&id=389776
4 -> Flying Heavy Metal With Bruce Dickinson [en] # http://thetvdb.com/?tab=series&id=84781
5 -> Flying Across Britain with Arthur Williams [en] # http://thetvdb.com/?tab=series&id=351122
Enter choice (first number, return for default, 'all', ? for help):
1
Traceback (most recent call last):
  File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Python39\Scripts\tvnamer.exe\__main__.py", line 7, in <module>
  File "c:\python39\lib\site-packages\tvnamer\main.py", line 474, in main
    tvnamer(paths = sorted(args))
  File "c:\python39\lib\site-packages\tvnamer\main.py", line 370, in tvnamer
    processFile(tvdb_instance, episode)
  File "c:\python39\lib\site-packages\tvnamer\main.py", line 175, in processFile
    episode.populateFromTvdb(tvdb_instance, force_name=Config['force_name'], series_id=Config['series_id'])
  File "c:\python39\lib\site-packages\tvnamer\utils.py", line 655, in populateFromTvdb
    self.seriesname = replaceOutputSeriesName(show['seriesname'])
  File "c:\python39\lib\site-packages\tvdb_api.py", line 347, in __getitem__
    raise tvdb_attributenotfound("Cannot find attribute %s" % (repr(key)))
tvdb_api.TvdbAttributeNotFound: Cannot find attribute 'seriesname'

Is this a bug or was something wrong from my side? I can post the verbose one as well if that's required. also the tvnamer version is

tvnamer version: 3.0.2
tvdb_api version: 3.1.0
dbr commented 3 years ago

Ah oops, in tvdb_api 3.1 I removed some old backwards-compatibility code which I must have never fixed up in tvnamer - TheTVDB V2 onwards used seriesName instead of seriesname

I'll fix this up now

dbr commented 3 years ago

Backported change to newly released tvnamer 3.0.3!