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

Will not start v2.0.3 #112

Closed
mscreations opened this issue Dec 8, 2023 · 4 comments · Fixed by #113
Closed

Will not start v2.0.3 #112

mscreations opened this issue Dec 8, 2023 · 4 comments · Fixed by #113
Labels
bug Something isn't working

Comments

@mscreations
Copy link

Before opening an issue make sure that there are no duplicates and that you are on the latest version.
Describe the bug
I recently updated my docker image to v2.0.3 but the container will not start. I get an exception

Arguments: (200, 'OK')
Connected to device None (Living Room TV)
--- Logging error ---
Traceback (most recent call last):
  File "/app/iSponsorBlockTV/ytlounge.py", line 180, in connect
    self._process_events(events)
  File "/usr/local/lib/python3.11/site-packages/pyytlounge/wrapper.py", line 325, in _process_events
    self._process_event(event_id, event_type, args)
  File "/app/iSponsorBlockTV/ytlounge.py", line 112, in _process_event
    device_info = json.loads(device.get("deviceInfo", ""))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/logging/__init__.py", line 1110, in emit
    msg = self.format(record)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 953, in format
    return fmt.format(record)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 687, in format
    record.message = record.getMessage()
                     ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/logging/__init__.py", line 377, in getMessage
    msg = msg % self.args
          ~~~~^~~~~~~~~~~
TypeError: not all arguments converted during string formatting
Call stack:
  File "/app/main.py", line 3, in <module>
    helpers.app_start()
  File "/app/iSponsorBlockTV/helpers.py", line 126, in app_start
    main.main(config, args.debug)
  File "/app/iSponsorBlockTV/main.py", line 144, in main
    loop.run_forever()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 607, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 1922, in _run_once
    handle._run()
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/app/iSponsorBlockTV/main.py", line 48, in loop
    await lounge_controller.connect()
  File "/app/iSponsorBlockTV/ytlounge.py", line 184, in connect
    self._logger.exception(ex, resp.status, resp.reason)
Message: JSONDecodeError('Expecting value: line 1 column 1 (char 0)')

I tried clearing my config completely and recreating it but still getting the error. Rolling back to v2.0.2 fixes the issue.

iSponsorBlockTV server (please complete the following information):

  • OS: Docker on Ubuntu 22.04.2 LTS

Apple TV (please complete the following information):

  • Device: LG webOS. App version web_20231206_09_RC00
  • OS: [e.g. tvOS 15.4]
@mscreations mscreations added the bug Something isn't working label Dec 8, 2023
@dmunozv04
Copy link
Owner

I think I've identified the issue. It looks like your TV isn't reporting the deviceInfo (as other devices do), and my placeholder device_info = json.loads(device.get("deviceInfo", "")) was wrong. I'll release v2.0.4 with a fix soon

dmunozv04 added a commit that referenced this issue Dec 9, 2023
dmunozv04 added a commit that referenced this issue Dec 9, 2023
@dmunozv04
Copy link
Owner

I've just published v2.0.4

@mscreations
Copy link
Author

Can confirm v2.0.4 fixed the issue. Thanks for the quick response and fix!

@dmunozv04
Copy link
Owner

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants