InsertDisc / pattrmm

Plex Meta Manager helper script for a chronological Returning Soon collection with dates.
GNU General Public License v3.0
40 stars 5 forks source link

JSONDecodeError with latest version #24

Closed bartolomesoriano closed 11 months ago

bartolomesoriano commented 11 months ago

Updated to latest version today (I run the stand-alone version, under Windows). I am getting the following error:

Traceback (most recent call last): File "E:\plex-meta-manager\pmm-venv\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\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 "E:\plex-meta-manager\config\scripts\pattrmm.py", line 1437, in traktListUrl = "https://api.trakt.tv/users/" + vars.traktApi('me') + "/lists" ^^^^^^^^^^^^^^^^^^^ File "E:\plex-meta-manager\config\scripts\vars.py", line 393, in traktApi key = json.loads(json.dumps(requests.get('https://api.trakt.tv/users/me', headers=headers).json()))['username'] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\plex-meta-manager\pmm-venv\Lib\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) pattrmm.log

InsertDisc commented 11 months ago

This may be an isolated incident. Can you verify everything is ok with your trakt account and the information in your pmm config file is still correct? Are you still experiencing this error?

bartolomesoriano commented 11 months ago

I just checked and my trakt account seems to be fine. It seems that the pmm access token needed to be refreshed. I am not sure why I was not getting any error in the pmm log. In any case, pattrmm is running fine. This issue can be closed.