mdhiggins / sma-mod

MIT License
7 stars 2 forks source link

Issue when tagging #15

Closed VampiricAlien closed 6 months ago

VampiricAlien commented 6 months ago

Something happens during tagging that adds the tags but doesn't delete the file with .tag in it so I end up with two files. on restart it will grab files from this repo. I could reinstall requests, this would be a temp fix.

 File "/usr/local/sma/venv/lib/python3.11/site-packages/requests/models.py", line 971, in json
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    return complexjson.loads(self.text, **kwargs)
2024-03-17 21:49:20.3|Debug|postSonarr.sh|           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    return _default_decoder.decode(s)
2024-03-17 21:49:20.3|Debug|postSonarr.sh|           ^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/lib/python3.11/json/decoder.py", line 337, in decode
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
2024-03-17 21:49:20.3|Debug|postSonarr.sh|               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/lib/python3.11/json/decoder.py", line 355, in raw_decode
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    raise JSONDecodeError("Expecting value", s, err.value) from None
2024-03-17 21:49:20.3|Debug|postSonarr.sh|json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2024-03-17 21:49:20.3|Debug|postSonarr.sh|During handling of the above exception, another exception occurred:
2024-03-17 21:49:20.3|Debug|postSonarr.sh|Traceback (most recent call last):
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/local/sma/postSonarr.py", line 260, in <module>
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    inProcess = settings.Sonarr['in-progress-check'] and downloadedEpisodesScanInProgress(baseURL, headers, episodefile_sourcefolder, log)
2024-03-17 21:49:20.3|Debug|postSonarr.sh|                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/local/sma/postSonarr.py", line 76, in downloadedEpisodesScanInProgress
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    commands = r.json()
2024-03-17 21:49:20.3|Debug|postSonarr.sh|               ^^^^^^^^
2024-03-17 21:49:20.3|Debug|postSonarr.sh|  File "/usr/local/sma/venv/lib/python3.11/site-packages/requests/models.py", line 975, in json
2024-03-17 21:49:20.3|Debug|postSonarr.sh|    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
2024-03-17 21:49:20.3|Debug|postSonarr.sh|requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2024-03-17 21:49:20.3|Debug|CustomScript|Executed external script: /usr/local/sma/config/postSonarr.sh - Status: 0
mdhiggins commented 6 months ago

Pull the logs from sma.log so I can see what’s actually happening. Looks like you’re getting an api error

mdhiggins commented 6 months ago

Nevermind I got enough, this is an API issue, the first attempt at connecting your sonarr api is failing

Check your API key and settings

You can double check here, that's the command that's failing, if you put in your server and API key you can test your API

https://sonarr.tv/docs/api/#/Command/get_api_v3_command

VampiricAlien commented 6 months ago

API details were already there, I've changed it to the domain and tested API, no issue. thanks