Open ghost opened 4 years ago
I'm having the same problem on latest unraid version.
/traktarr # ./traktarr.py trakt_authentication
2020-04-27 21:04:46,457 - INFO - media.trakt - oauth_request_device_code - We're talking to Trakt to get your verification code. Please wait a moment... {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': ''} 2020-04-27 21:04:46,990 - ERROR - media.trakt - oauth_authentication - Exception occurred when authenticating user Traceback (most recent call last): File "/traktarr/media/trakt.py", line 359, in oauth_authentication device_code_response = self.__oauth_request_device_code() File "/traktarr/media/trakt.py", line 270, in oauth_request_device_code device_code_response = req.json() File "/usr/lib/python3.8/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/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)
Unraid 6.8.3 and having same issue
2020-05-18 09:58:27,918 - INFO - media.trakt - oauth_request_device_code - We're talking to Trakt to get your verification code. Please wait a moment... {'Content-Type': 'application/json', 'trakt-api-version': '2', 'trakt-api-key': ''} 2020-05-18 09:58:28,108 - ERROR - media.trakt - oauth_authentication - Exception occurred when authenticating user Traceback (most recent call last): File "/traktarr/media/trakt.py", line 359, in oauth_authentication device_code_response = self.__oauth_request_device_code() File "/traktarr/media/trakt.py", line 270, in oauth_request_device_code device_code_response = req.json() File "/usr/lib/python3.8/site-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.8/json/init.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.8/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)
I had exactly the same error, also unraid. So I decided to print out the request that the stacktrace is telling us that it can't decode and I saw that the response from trakt gave a http status code 403 back. So I went back to the readme file and saw that in the previous step, we had to create an app in trakt.tv and give it the clientId and clientSecret which I did not enter in my config on my new install. So probably you guys missed that step too. After filling in the clientId and clientSecret I was able to succesfuly run traktarr trakt_authentication
Describe the bug Fresh install of Traktarr crashes when trying to run due to oauth error but I can't run "[sudo] traktarr trakt_authentication"
Expected behavior create an activation key and link to trakt.com/activate Logs Link to debug or trace log files. 2020-04-26 03:26:07,988 - INFO - media.trakt - oauth_request_device_code - We're talking to Trakt to get your verification code. Please wait a moment... 2020-04-26 03:26:08,308 - ERROR - media.trakt - oauth_authentication - Exception occurred when authenticating user Traceback (most recent call last): File "/opt/traktarr/media/trakt.py", line 359, in oauth_authentication device_code_response = self.__oauth_request_device_code() File "/opt/traktarr/media/trakt.py", line 270, in oauth_request_device_code device_code_response = req.json() File "/usr/local/lib/python3.6/dist-packages/requests/models.py", line 897, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3.6/json/init.py", line 354, in loads return _default_decoder.decode(s) File "/usr/lib/python3.6/json/decoder.py", line 339, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
System Information