-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python-autarco with PyCharm #413
Comments
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 ( ./Klaas |
Postman response:
|
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.
1. 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")
2. 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 <#413> as completed.
—
Reply to this email directly, view it on GitHub <#413 (comment)> , 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 |
This problem will be resolved in the next release. ./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..?
The text was updated successfully, but these errors were encountered: