gazpachoking / trainaspower

Convert TrainAsOne training plans from pace to power, and upload them to FinalSurge for use in Stryd workouts.
21 stars 5 forks source link

Problem #13

Closed PetrSpicak closed 3 years ago

PetrSpicak commented 3 years ago

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)
jahofmann commented 3 years ago

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

gazpachoking commented 3 years ago

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

PetrSpicak commented 3 years ago

Hello, so unfortunately even the new version v0.6.2 make mistakes. I'm doing something wrong?       2021-05-25 18:26:37.634 | ERROR    | main::107 - An error has been caught in function '', process 'MainProcess' (5632), thread 'MainThread' (6892): Traceback (most recent call last):  

File "trainaspower\main.py", line 107, in     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 335, in loads   json.decoder.JSONDecodeError: Unexpected UTF-8 BOM (decode using utf-8-sig): line 1 column 1 (char 0)      


Od: "Chase Sterling" @.> Komu: "gazpachoking/trainaspower" @.> Datum: 25.05.2021 15:36 Předmět: Re: [gazpachoking/trainaspower] Problem (#13)

  Closed #13 https://github.com/gazpachoking/trainaspower/issues/13. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gazpachoking/trainaspower/issues/13#event-4792771006, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUGWAHQHFFBYMOEAVXT6VDDTPORWPANCNFSM45OQ2QJA.

gazpachoking commented 3 years ago

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

PetrSpicak commented 3 years ago

  Everything is working, thank you very much. Petr    


Od: "Chase Sterling" @.> Komu: "gazpachoking/trainaspower" @.> Datum: 25.05.2021 20:34 Předmět: Re: [gazpachoking/trainaspower] Problem (#13)

  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 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gazpachoking/trainaspower/issues/13#issuecomment-848119537, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUGWAHXMUQ7COCI4LJB6KF3TPPUT7ANCNFSM45OQ2QJA.