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

Crash querying Google OnHub device: 'NoneType' object has no attribute 'findtext' #1

Closed
mhansen opened this issue Nov 30, 2019 · 2 comments

Comments

@mhansen
Copy link

mhansen commented Nov 30, 2019

Hi there, I just tried probing my network then running the probe: I see this in the logs, and a server error over HTTP.

::ffff:192.168.86.31 - - [30/Nov/2019 16:08:57] "GET /probe?target=http%3A%2F%2F192.168.86.1%3A5000%2FrootDesc.xml HTTP/1.1" 500 59
Traceback (most recent call last):
File "/usr/lib/python3.7/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/home/pi/.local/lib/python3.7/site-packages/igd_exporter/exporter.py", line 20, in wsgi_app
return probe(environ, start_response)
File "/home/pi/.local/lib/python3.7/site-packages/igd_exporter/exporter.py", line 99, in probe
reg.register(igd.probe(qs['target'][0]))
File "/home/pi/.local/lib/python3.7/site-packages/igd_exporter/igd.py", line 151, in probe
device = probe_device(target_url)
File "/home/pi/.local/lib/python3.7/site-packages/igd_exporter/igd.py", line 182, in probe_device
url_path = device.findtext("d:serviceList/d:service[d:serviceType='urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1']/d:controlURL", namespaces=ns)
AttributeError: 'NoneType' object has no attribute 'findtext'

@mhansen mhansen changed the title Crash querying Google OnHub device: 'NonType' object has no attribute 'findtext' Crash querying Google OnHub device: 'NoneType' object has no attribute 'findtext' Jan 12, 2020
@mhansen
Copy link
Author

mhansen commented Jan 12, 2020

Looks like it's looking for a deviceType urn:schemas-upnp-org:device:InternetGatewayDevice:1
, when the onHub ends with :2 instead of :1.

@yrro
Copy link
Owner

yrro commented Jun 17, 2022

Assuming this is a dupe of #4

@yrro yrro closed this as completed Jun 17, 2022
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