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

Failed to extract Devices data, Error: 'NoneType' object has no attribute 'get', Line: 799 #105

Open
rosstroha opened this issue Jul 7, 2023 · 6 comments

Comments

@rosstroha
Copy link

What can I do to stop this error from showing up hundreds of times?
image

@elad-bar
Copy link
Owner

elad-bar commented Jul 7, 2023

can you please provide debug log level to understand what led for that issue?

thanks

@elad-bar
Copy link
Owner

elad-bar commented Jul 7, 2023

I will also need more details as the last release was 4 months ago,
is it new issue? are you new user of that integration? what device are you using?

thanks

@rosstroha
Copy link
Author

@elad-bar Hey sorry for not providing that information to begin with!

It's not a new issue. I think I've seen it around for a while, but just haven't asked about it.

Device: EdgeRouter X using EdgeOS 2.0.9-hotfix7

Contextual debug logs (I can provide more if needed)

2023-07-10 09:00:59.132 INFO (MainThread) [custom_components.edgeos.component.managers.home_assistant] API Status changed to Connected, WS Status: NotConnected
2023-07-10 09:00:59.226 DEBUG (SyncWorker_5) [custom_components.edgeos.component.managers.home_assistant] Loading entities
2023-07-10 09:01:01.657 DEBUG (SyncWorker_4) [custom_components.edgeos.component.managers.home_assistant] Loading entities
2023-07-10 09:01:01.678 DEBUG (MainThread) [custom_components.edgeos.component.api.api] Loading sys_info data
2023-07-10 09:01:01.711 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.frigate
2023-07-10 09:01:01.712 INFO (MainThread) [homeassistant.components.camera] Setting up camera.frigate
2023-07-10 09:01:01.713 INFO (MainThread) [homeassistant.components.number] Setting up number.frigate
2023-07-10 09:01:01.714 INFO (MainThread) [homeassistant.components.switch] Setting up switch.frigate
2023-07-10 09:01:01.715 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.frigate
2023-07-10 09:01:01.716 INFO (MainThread) [homeassistant.components.update] Setting up update.frigate
2023-07-10 09:01:01.760 DEBUG (MainThread) [custom_components.edgeos.component.api.api] Loading dhcp_stats data
2023-07-10 09:01:01.976 DEBUG (MainThread) [custom_components.edgeos.component.api.api] Loading dhcp-leases data
2023-07-10 09:01:02.249 DEBUG (MainThread) [custom_components.edgeos.component.managers.home_assistant] Extracting API Data
2023-07-10 09:01:02.249 INFO (MainThread) [custom_components.edgeos.component.managers.home_assistant] ['User hass level is operator, Interface status switch will not be created as it requires admin role']
2023-07-10 09:01:02.250 ERROR (MainThread) [custom_components.edgeos.component.managers.home_assistant] Failed to extract Devices data, Error: 'NoneType' object has no attribute 'get', Line: 799
2023-07-10 09:01:02.253 DEBUG (MainThread) [custom_components.edgeos.component.api.websocket] Initializing WebSocket connection
2023-07-10 09:01:02.253 INFO (MainThread) [custom_components.edgeos.core.api.base_api] Performing login
2023-07-10 09:01:02.253 INFO (MainThread) [custom_components.edgeos.component.managers.home_assistant] WS Status changed to Connecting, API Status: Connected
2023-07-10 09:01:02.256 INFO (MainThread) [custom_components.edgeos.component.managers.home_assistant] WS Status changed to Connected, API Status: Connected
2023-07-10 09:01:02.256 INFO (MainThread) [custom_components.edgeos.component.api.websocket] Starting to listen connected
2023-07-10 09:01:02.256 DEBUG (MainThread) [custom_components.edgeos.component.api.websocket] Subscription data to be sent: 164{"SUBSCRIBE":[{"name":"export"},{"name":"interfaces"},{"name":"system-stats"},{"name":"discover"}],"UNSUBSCRIBE":[],"SESSION_ID":"21dad6b0060a4b0d835a184fb69cfbba"}
2023-07-10 09:01:02.256 INFO (MainThread) [custom_components.edgeos.component.api.websocket] Subscribed to WS payloads

@rosstroha
Copy link
Author

I think it's happening while extracting API data. The error seems to show up most often right before that log message

2023-07-10 09:04:00.340 DEBUG (MainThread) [custom_components.edgeos.component.managers.home_assistant] Extracting API Data
2023-07-10 09:04:00.340 ERROR (MainThread) [custom_components.edgeos.component.managers.home_assistant] Failed to extract Devices data, Error: 'NoneType' object has no attribute 'get', Line: 799
2023-07-10 09:04:00.439 DEBUG (SyncWorker_3) [custom_components.edgeos.component.managers.home_assistant] Loading entities

@rosstroha
Copy link
Author

I think it's this line

It seems to be an edge case where hostname or device name aren't configured in the router, maybe?

@rosstroha
Copy link
Author

Hi @elad-bar have you had a chance to look into this?

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