-
Notifications
You must be signed in to change notification settings - Fork 58
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: 'NewIPAddress' #21
Comments
For reproducing your issue I have created a fresh virtual environment with Python 3.7 and fritzconnection 0.8.4 (via pip install). This installs a
This runs smoothly – so I'm unable to reproduce this KeyError so far. |
I have tryed by shell and there is no problem. But into log i have 1094 error message for this problem. I have in my config the interval_seconds set to 10 seconds i'm trying with 30s maybe can help. device_tracker:
Do you think it was a problem of a very little interval ? Thanks. |
As the error is not reproducible by calling the fritzhosts module directly, it maybe an issue by home-assistant. Indeed it seems to be a known issue there: |
Same issue here... |
Version 1.0 is out. Maybe this version can provide a more helpful error message in combination with home-assistant. |
I had the same issue with my main HA instance reporting this 'NewIPAddress' error. |
I wondered whether the new version will change this behaviour (Task exception in device tracker #27257), cause the corresponding code in fritzconnection has not changed. The error means that the router returns something for a given device-index (without raising an internal error), but does at least not report an |
I'm on holiday now, will look into this more next week.
In version 1.0.1 has an try-catch to avoid index errors. If the for-loop exceeds the index it could be logical that |
I suppose that in some rare cases the number of hosts may change during loop execution. By decreasing hosts this will be a problem in version 0.8.4, versions >= 1.0 should not be affected by this. |
I generated the error via the fritzhost module directly, not sure if it helps: bash-5.0# fritzhosts -i 192.168.178.1 FritzHosts: List of registered hosts: n: ip name mac status Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
@mike-crawfurd: you have to provide a password to run this. |
Hi @kbr, Apologies, I didn't realise this. I retried and got this error in its stead: List of registered hosts: n: ip name mac status Traceback (most recent call last): |
Seem to be another issue. Hard to tell why this happens. It's unlikely that there will be a 0.8.5 for Python 2 support. Can you try 1.2.1 ? |
As this seems to be solved with version 1.0 I like to close this issue. Feel free to reopen, if the error shows up again. |
Hi,
I have a problem with my integration of Fritz into hassio into log i recive alots of messages about an error include /usr/local/lib/python3.7/site-packages/fritzconnection/fritzhosts.py method get_hosts_info.
File "/usr/local/lib/python3.7/site-packages/fritzconnection/fritzhosts.py", line 73, in get_hosts_info
'ip': host['NewIPAddress'],
KeyError: 'NewIPAddress'
I thing the problem it is in these point for some reason my fritz don't give any host result
I have FRITZ!Box 4040 with 07.12.
Thanks for the Help.
The text was updated successfully, but these errors were encountered: