dbr / tvnamer

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

NameError: global name 'lid_map' is not defined #179

Closed jonsag closed 4 years ago

jonsag commented 4 years ago

Hi

Running the development version as of commit d9d2f35

$ tvnamer --version
tvnamer version: (2, 5)
tvdb_api version: 3.0.1

Get's the error in the topic on every file Example:

$ tvnamer Veep.s06e*mp4 Loading config: /home/jon/.config/tvnamer/tvnamer.json #################### # Starting tvnamer # Found 10 episodes #################### # Processing file: Veep.s06e01.Omaha.mp4 # Detected series: Veep (season: 6, episode: 1) TVDB Search Results: Traceback (most recent call last): File "/usr/local/bin/tvnamer", line 11, in load_entry_point('tvnamer==2.5', 'console_scripts', 'tvnamer')() File "build/bdist.linux-x86_64/egg/tvnamer/main.py", line 464, in main File "build/bdist.linux-x86_64/egg/tvnamer/main.py", line 360, in tvnamer File "build/bdist.linux-x86_64/egg/tvnamer/main.py", line 172, in processFile File "build/bdist.linux-x86_64/egg/tvnamer/utils.py", line 641, in populateFromTvdb File "/home/jon/.local/lib/python2.7/site-packages/tvdb_api.py", line 1163, in getitem sid = self._nameToSid(key) File "/home/jon/.local/lib/python2.7/site-packages/tvdb_api.py", line 1147, in _nameToSid selected_series = self._getSeries(name) File "/home/jon/.local/lib/python2.7/site-packages/tvdb_api.py", line 960, in _getSeries return ui.selectSeries(allSeries) File "/home/jon/.local/lib/python2.7/site-packages/tvdb_api.py", line 208, in selectSeries self._displaySeries(allSeries) File "/home/jon/.local/lib/python2.7/site-packages/tvdb_api.py", line 198, in _displaySeries lid_map[cshow['lid']], NameError: global name 'lid_map' is not defined

Files in directory:

$ ls -alFh *mp4 -rw-rw-r-- 1 jon jon 196M May 1 12:22 Veep.s06e01.Omaha.mp4
-rw-rw-r-- 1 jon jon 197M May 4 07:03 Veep.s06e02.Library.mp4
-rw-rw-r-- 1 jon jon 197M May 5 07:01 Veep.s06e03.Georgia.mp4
-rw-rw-r-- 1 jon jon 294M May 6 07:01 Veep.s06e04.Justice.mp4
-rw-rw-r-- 1 jon jon 295M May 7 07:03 Veep.s06e05.Chicklet.mp4
-rw-rw-r-- 1 jon jon 196M May 8 06:53 Veep.s06e06.Qatar.mp4
-rw-rw-r-- 1 jon jon 294M May 11 07:01 Veep.s06e07.Blurb.mp4
-rw-rw-r-- 1 jon jon 295M May 12 07:02 Veep.s06e08.Judge.mp4
-rw-rw-r-- 1 jon jon 196M May 13 07:01 'Veep.s06e09.A Woman First.mp4'
-rw-rw-r-- 1 jon jon 296M May 14 07:01 Veep.s06e10.Groundbreaking.mp4

Thanks for all work on this project /jon

dbr commented 4 years ago

Ah oops - this is now fixed in tvdb_api==3.0.2 - if you upgrade that it should work

jonsag commented 4 years ago

Great

Thanks for the quick reply!

/jon