Open Quidditchspiele opened 4 weeks ago
Looks like it can't find the public_key from the response.
./Klaas
Yes, that could be, but I don´t understand why? Because the email and the password is correct. The login with a browser works fine.
The public_key is retrieved from the following URL (https://my.autarco.com/api/site/
), you could use Postman to see what the response is with your own login. Unfortunately I don't own an Autarco to check this myself.
./Klaas
The response of Postman is OK. I can see the expected "public_key". I don´t believe that the handling with the public_key is the reason. I think I have done something wrong in my development environment. I will create a new setup from scratch.
Klaas, thanks for the support...
Hi Klaas,
today I have done some investigations with the Autarco package. For me two modifications are required. Now it works fine with my development environment.
Error message:
File "C:\Users\PC\Projekte\PhotoVoltaik_NV\python-autarco\src\autarco\autarco.py", line 134, in get_public_key
public_key: str = data[0]["public_key"]
~~~~^^^
The solution:
data = json.loads(response)
# public_key: str = data[0]["public_key"]
data = data.get("data")
data = data[0]
public_key = data.get("public_key")
Error message:
mashumaro.exceptions.InvalidFieldValue: Field "stats" of type dict[str, dict[str, int]] in PowerResponse has invalid value {'graphs': {'pv_power'……………..
The solution:
@dataclass class PowerResponse(DataClassORJSONMixin): inverters: dict[str, Inverter] stats: dict[str, dict[str, Any]] # Any instead of int..
Just as a info for you…
Have a nice day and thank you for your work.
Friedhelm
Von: Klaas Schoute @.> Gesendet: Montag, 10. Juni 2024 21:50 An: klaasnicolaas/python-autarco @.> Cc: Quidditchspiele @.>; Author @.> Betreff: Re: [klaasnicolaas/python-autarco] Python-autarco with PyCharm (Issue #413)
Closed #413 https://github.com/klaasnicolaas/python-autarco/issues/413 as completed.
— Reply to this email directly, view it on GitHub https://github.com/klaasnicolaas/python-autarco/issues/413#event-13106689656 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AV2332TKR2GWNJPRQDOB4DTZGX7OLAVCNFSM6AAAAABI2ERIASVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGEYDMNRYHE3DKNQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AV2332S2RVSTAGLLNY4ZOUDZGX7OLA5CNFSM6AAAAABI2ERIASWGG33NNVSW45C7OR4XAZNWJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XKUY3PNVWWK3TUL5UWJTYAAAAAGDJYGZ4A.gif Message ID: @. @.> >
Do not respond to emails from Github, but post them directly on GitHub. Otherwise it is not readable 😅
./Klaas
I try to take the latest Python-autarco version in operation mode with the PyCharm IDE. I use Python 3.12.3. Unfortunately I get always the following error messages.
Any idea..?