klejejs / python-thermia-online-api

A Python API for Thermia heat pumps using https://online.thermia.se
GNU General Public License v3.0
25 stars 10 forks source link

New Issue from appears 30.04.2024 #31

Closed Vovanoso closed 4 months ago

Vovanoso commented 4 months ago

Launching example.py it give the error: Traceback (most recent call last): File "C:\Users\ganet\PycharmProjects\pythonProject\Thermia\Sql\example.py", line 18, in thermia = Thermia(USERNAME, PASSWORD, api_type=API_TYPE) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ganet\Pycharm\Lib\site-packages\ThermiaOnlineAPI__init.py", line 14, in init self.api_interface = ThermiaAPI(username, password, api_type) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ganet\Pycharm\Lib\site-packages\ThermiaOnlineAPI\api\ThermiaAPI.py", line 78, in init self.authenticated = self.authenticate() ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\ganet\Pycharm\Lib\site-packages\ThermiaOnlineAPI\api\ThermiaAPI.py", line 590, in __authenticate settings = json.loads(settings_string[0][15:-1]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\json__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\Python312\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)

Process finished with exit code 1

klejejs commented 4 months ago

Thanks for reporting! The latest version has fixed the issue that arose due to data parsing problems.