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 when no video file is present #12

Open
zerodayz1 opened this issue Apr 19, 2024 · 0 comments
Open

Crash when no video file is present #12

zerodayz1 opened this issue Apr 19, 2024 · 0 comments

Comments

@zerodayz1
Copy link

zerodayz1 commented Apr 19, 2024

The script fails when encountering an entry in Emby where there is no video present. An odd case, I agree.
But if a show or movie is present in the Emby DB, but the corresponding video file is missing the following error is thrown:

Traceback (most recent call last):
  File "/opt/scripts/jellybean/run.py", line 176, in overlays
    episodes = response3.json()['Items']
  File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
    return complexjson.loads(self.text, **kwargs)
  File "/home/seed/.local/lib/python3.10/site-packages/simplejson/__init__.py", line 514, in loads
    return _default_decoder.decode(s)
  File "/home/seed/.local/lib/python3.10/site-packages/simplejson/decoder.py", line 386, in decode
    obj, end = self.raw_decode(s)
  File "/home/seed/.local/lib/python3.10/site-packages/simplejson/decoder.py", line 416, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/scripts/jellybean/run.py", line 538, in <module>
    main()
  File "/opt/scripts/jellybean/run.py", line 114, in main
    overlays(library, library_type, items, config_vars)
  File "/opt/scripts/jellybean/run.py", line 177, in overlays
    except (json.JSONDecodeError, requests.exceptions.JSONDecodeError, simplejson.errors.JSONDecodeError):
AttributeError: module 'requests.exceptions' has no attribute 'JSONDecodeError'

I'll clean up the entries from Emby, but would be good to allow continuing on errors like this, as there is no way to move past it, fails every time on missing files.

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

1 participant