Closed SmartC2016 closed 4 years ago
Will check this next weekend when I have access to the hardware.
I can't replicate that error on the 1.0 branch but I do have trouble connecting even with the correct password from the CLI
fritzconnection charlieclark$ fritzconnection -i fritz.box -p pw
FritzConnection v1.0a1
Traceback (most recent call last):
File "/Users/charlieclark/Projects/fritzconnection/bin/fritzconnection", line 11, in <module>
load_entry_point('fritzconnection', 'console_scripts', 'fritzconnection')()
File "/Users/charlieclark/Projects/fritzconnection/fritzconnection/cli/fritzinspection.py", line 139, in main
inspector.view_header()
File "/Users/charlieclark/Projects/fritzconnection/fritzconnection/cli/fritzinspection.py", line 35, in view_header
print(self.fc)
File "/Users/charlieclark/Projects/fritzconnection/fritzconnection/core/fritzconnection.py", line 77, in __repr__
return f'{self.device_manager.modelname} at ip {self.soaper.address}'
File "/Users/charlieclark/Projects/fritzconnection/fritzconnection/core/devices.py", line 33, in modelname
return self.descriptions[0].device_model_name
IndexError: list index out of range
On the same system, in Python itself I can usually connect but get a different exception.
fc.call_action('WLANConfiguration1', 'GetInfo')
Traceback (most recent call last):
Python Shell, prompt 7, line 121
builtins.KeyError: 'WLANConfiguration1'
During handling of the above exception, another exception was raised:
Traceback (most recent call last):
Python Shell, prompt 7, line 1
# Used internally for debug sandbox under external interpreter
File "/Users/charlieclark/Projects/fritzconnection/fritzconnection/core/fritzconnection.py", line 123, in call_action
raise FritzServiceError(f'unknown service: "{service_name}"')
fritzconnection.core.exceptions.FritzServiceError: unknown service: "WLANConfiguration1"
Seems the box is unable to read the description files. May be a side effect of removing lxml. I can go to this by end of the week. Sorry, no sooner. Should set up a VPN then.
I suppose I found it – at least in theory: the documentation of DeviceManager.add_description
is misleading. The parameter source
is not the xml-source but the url where to retrieve the source from the box. lxml can handle this, but ElementTree from the stdlib can't. So this should be fixed in __init__
of FritzConnection to send the sources to add_description and not the url.
This and Christians topic are two different issues.
Agreed. I think there are two separate additional issues: the transient one relating to model name (I've had this in the CLI and in the Python shell) and the service description thingy. I'll create some tickets and see if I can run some low level tests for more meaningful data. @SmartC2016 can you add the model number to your description?
There have been some subtle issues left in error raising. Is fixed now by 21499f7ec68cc5ec0268cccd5088e83569edbd0f
When I try:
I get a trace back error:
Traceback (most recent call last):