[GH-ISSUE #26] ubearchivist-jf python main.py : KO #21

Closed
opened 2026-03-23 20:33:02 +00:00 by mirror · 5 comments
Owner

Originally created by @Nomtest on GitHub (Jan 7, 2024).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-jf/issues/26

Hello,

proabably a beginer error on my side.

docker exec -it tubearchivist-jf python main.py

Why the output is the one below ?

Traceback (most recent call last):
File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 "/app/main.py", line 18, in
main()
File "/app/main.py", line 10, in main
Jellyfin().ping()
File "/app/src/connect.py", line 55, in ping
response = self.get("Users")
^^^^^^^^^^^^^^^^^
File "/app/src/connect.py", line 28, in get
return response.json()
^^^^^^^^^^^^^^^
File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Originally created by @Nomtest on GitHub (Jan 7, 2024). Original GitHub issue: https://github.com/tubearchivist/tubearchivist-jf/issues/26 Hello, proabably a beginer error on my side. # docker exec -it tubearchivist-jf python main.py Why the output is the one below ? Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 "/app/main.py", line 18, in <module> main() File "/app/main.py", line 10, in main Jellyfin().ping() File "/app/src/connect.py", line 55, in ping response = self.get("Users") ^^^^^^^^^^^^^^^^^ File "/app/src/connect.py", line 28, in get return response.json() ^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
mirror 2026-03-23 20:33:02 +00:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@Nomtest commented on GitHub (Jan 8, 2024):

previous error : ok after add a schem to TA_URL.

... But now there is :

docker exec -it tubearchivist-jf python main.py

[connection] verified jellyfin connection
[connection] verified tube archivist connection
Error processing request.
Traceback (most recent call last):
File "/app/main.py", line 18, in
main()
File "/app/main.py", line 13, in main
library = Library()
^^^^^^^^^
File "/app/src/series.py", line 19, in init
self.yt_collection: str = self.get_yt_collection()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/src/series.py", line 25, in get_yt_collection
for folder in folders["Items"]:
~~~~~~~^^^^^^^^^
KeyError: 'Items'

                                                                    Why ? 
<!-- gh-comment-id:1881873793 --> @Nomtest commented on GitHub (Jan 8, 2024): previous error : ok after add a schem to TA_URL. ... But now there is : # docker exec -it tubearchivist-jf python main.py [connection] verified jellyfin connection [connection] verified tube archivist connection Error processing request. Traceback (most recent call last): File "/app/main.py", line 18, in <module> main() File "/app/main.py", line 13, in main library = Library() ^^^^^^^^^ File "/app/src/series.py", line 19, in __init__ self.yt_collection: str = self.get_yt_collection() ^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/src/series.py", line 25, in get_yt_collection for folder in folders["Items"]: ~~~~~~~^^^^^^^^^ KeyError: 'Items' Why ?
Author
Owner

@bbilly1 commented on GitHub (Jan 27, 2024):

Probably didn't name things as expected? Check the readme and make sure you name everything as described.

<!-- gh-comment-id:1912982972 --> @bbilly1 commented on GitHub (Jan 27, 2024): Probably didn't name things as expected? Check the readme and make sure you name everything as described.
Author
Owner

@conways-glider commented on GitHub (Apr 11, 2024):

I'm running into the same issue.

Logs:

➜ docker exec -it tubearchivist-jf python main.py
Traceback (most recent call last):
  File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 "/app/main.py", line 18, in <module>
    main()
  File "/app/main.py", line 10, in main
    Jellyfin().ping()
  File "/app/src/connect.py", line 55, in ping
    response = self.get("Users")
               ^^^^^^^^^^^^^^^^^
  File "/app/src/connect.py", line 28, in get
    return response.json()
           ^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Docker Compose:

  tubearchivist-jf:
    image: bbilly1/tubearchivist-jf
    container_name: tubearchivist-jf
    environment:
      - TA_URL=http://tubearchivist:8000
      - TA_TOKEN=${TUBE_ARCHIVIST_API_KEY}
      - JF_URL=http://jellyfin:8096
      - JF_TOKEN=${JELLYFIN_API_KEY}
    volumes:
      - youtube:/youtube  # matching youtube volume as in Tube Archivist
    expose:
      - "8001"

I have validated that I can curl those URLs from the container as well.

<!-- gh-comment-id:2050608870 --> @conways-glider commented on GitHub (Apr 11, 2024): I'm running into the same issue. Logs: ``` ➜ docker exec -it tubearchivist-jf python main.py Traceback (most recent call last): File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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 "/app/main.py", line 18, in <module> main() File "/app/main.py", line 10, in main Jellyfin().ping() File "/app/src/connect.py", line 55, in ping response = self.get("Users") ^^^^^^^^^^^^^^^^^ File "/app/src/connect.py", line 28, in get return response.json() ^^^^^^^^^^^^^^^ File "/root/.local/lib/python3.11/site-packages/requests/models.py", line 975, in json raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0) ``` Docker Compose: ``` tubearchivist-jf: image: bbilly1/tubearchivist-jf container_name: tubearchivist-jf environment: - TA_URL=http://tubearchivist:8000 - TA_TOKEN=${TUBE_ARCHIVIST_API_KEY} - JF_URL=http://jellyfin:8096 - JF_TOKEN=${JELLYFIN_API_KEY} volumes: - youtube:/youtube # matching youtube volume as in Tube Archivist expose: - "8001" ``` I have validated that I can curl those URLs from the container as well.
Author
Owner

@Iliannnn commented on GitHub (Apr 12, 2024):

Have you tried the Jellyfin TubeArchivist Plugin yet? It integrates fully with Jellyfin as a plugin and not just with an API integration, this might fix your issues.

<!-- gh-comment-id:2051070385 --> @Iliannnn commented on GitHub (Apr 12, 2024): Have you tried the [Jellyfin TubeArchivist Plugin](https://github.com/DarkFighterLuke/TubeArchivistMetadata/) yet? It integrates fully with Jellyfin as a plugin and not just with an API integration, this might fix your issues.
Author
Owner

@bbilly1 commented on GitHub (Apr 19, 2024):

Switch to the plugin: https://github.com/tubearchivist/tubearchivist-jf-plugin

That doesn't depend on that.

<!-- gh-comment-id:2067384693 --> @bbilly1 commented on GitHub (Apr 19, 2024): Switch to the plugin: https://github.com/tubearchivist/tubearchivist-jf-plugin That doesn't depend on that.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tubearchivist/tubearchivist-jf#21
No description provided.