gazpachoking/trainaspower

Problem

PetrSpicak opened this issue · 5 comments

Hello, I can't do my training today. I'm using the latest version of the program and it reports this
Is there anything you can do about it? Thank you

2021-05-25 07:25:53.875 | ERROR    | __main__:<module>:107 - An error has been caught in function '<module>', process 'MainProcess' (5140), thread 'MainThread' (1236):
Traceback (most recent call last):

> File "trainaspower\main.py", line 107, in <module>

  File "trainaspower\main.py", line 83, in main

  File "trainaspower\finalsurge.py", line 30, in login

  File "requests\models.py", line 900, in json

  File "json\__init__.py", line 346, in loads

  File "json\decoder.py", line 337, in decode

  File "json\decoder.py", line 355, in raw_decode

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2021-05-25 07:29:37.284 | ERROR    | __main__:<module>:107 - An error has been caught in function '<module>', process 'MainProcess' (10864), thread 'MainThread' (6864):
Traceback (most recent call last):

> File "trainaspower\main.py", line 107, in <module>

  File "trainaspower\main.py", line 83, in main

  File "trainaspower\finalsurge.py", line 30, in login

  File "requests\models.py", line 900, in json

  File "json\__init__.py", line 346, in loads

  File "json\decoder.py", line 337, in decode

  File "json\decoder.py", line 355, in raw_decode

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I've created a pull request to address this issue. Seems like FinalSurge changed their API a bit.

Pushed a fix for this. (Thank you @jahofmann for also fixing it, I didn't see you were working on it until I was already done.) v0.6.2

It looks like they changed their API back. Who knows if they'll flip back again, feel free to report here again if they do. v0.6.3 just reverted the last change