dbr / tvnamer

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

Getting a SimpleJson error when running tvnamer on ANY file #143

Closed jaredmichaelwilliams closed 6 years ago

jaredmichaelwilliams commented 6 years ago
# Starting tvnamer
# Found 1 episode
# Processing file: Arrow.S06E17.720p.HDTV.x264-AVS.mkv
# Detected series: Arrow (season: 6, episode: 17)
Traceback (most recent call last):
  File "/usr/local/bin/tvnamer", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/tvnamer/main.py", line 436, in main
    tvnamer(paths = sorted(args))
  File "/usr/local/lib/python2.7/dist-packages/tvnamer/main.py", line 342, in tvnamer
    processFile(tvdb_instance, episode)
  File "/usr/local/lib/python2.7/dist-packages/tvnamer/main.py", line 170, in processFile
    episode.populateFromTvdb(tvdb_instance, force_name=Config['force_name'], series_id=Config['series_id'])
  File "/usr/local/lib/python2.7/dist-packages/tvnamer/utils.py", line 640, in populateFromTvdb
    show = tvdb_instance[force_name or self.seriesname]
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 1182, in __getitem__
    sid = self._nameToSid(key)
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 1163, in _nameToSid
    selected_series = self._getSeries(name)
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 963, in _getSeries
    allSeries = self.search(series)
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 943, in search
    seriesEt = self._getetsrc(self.config['url_getSeries'] % (series))
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 903, in _getetsrc
    src = self._loadUrl(url, language=language)
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 850, in _loadUrl
    self.authorize()
  File "/usr/local/lib/python2.7/dist-packages/tvdb_api.py", line 891, in authorize
    r_json = r.json()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 819, in json
    return json.loads(self.text, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/__init__.py", line 518, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 370, in decode
    obj, end = self.raw_decode(s)
  File "/usr/local/lib/python2.7/dist-packages/simplejson/decoder.py", line 400, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
lozbrown commented 6 years ago

Likewise, has something changed in the thetvdb?

lozbrown commented 6 years ago

It seems the API is actually down, handleing this situation a bit better would be nice but there is nothing fundamentally wrong with tvnamer or tvdb-api

https://forums.thetvdb.com/viewtopic.php?f=17&t=46729

lozbrown commented 6 years ago

This seems to be back except the API is up this time