Skip to content
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

KeyError: 'xauth' #3

Open
Alfy1080 opened this issue Feb 11, 2024 · 1 comment
Open

KeyError: 'xauth' #3

Alfy1080 opened this issue Feb 11, 2024 · 1 comment

Comments

@Alfy1080
Copy link

Hello.

Thanks for the great work on this project.
I've been trying to get this to work for myself but after configuring everything, when i try any of the possible actions i get the following error:

(eon-api) root@homeassistant:~/eon-api# python3 read_invoices.py
Traceback (most recent call last):
File "/root/eon-api/read_invoices.py", line 3, in
eon = EON('MY_EMAIL', 'MY_PASSWORD')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/eon-api/lib/python3.11/site-packages/eon/client.py", line 24, in init
self._token = self.login(username, password)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/eon-api/lib/python3.11/site-packages/eon/client.py", line 43, in login
return response.headers['XAuth']
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/root/eon-api/lib/python3.11/site-packages/requests/structures.py", line 52, in getitem
return self._store[key.lower()][1]
~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'xauth'

Is there something that i am doing wrong or is this no longer working due to some changes made by e.on?

Thanks!

@vrachieru
Copy link
Owner

Hi,

The examples are pretty straight forward and I see you only initializing the client in the snippet you provided, that should be fine.
I'm no longer using this code for quite some time so I don't know about the changes to eon's api.
It could very well be that they've made some breaking changes in the past 6 years :).

That being said I won't invest the time to debug the error.
If you do and would like to share your results, PRs are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants