Skip to content

Can't follow typical usage examples from readme #42

@R0CKH0PP3R

Description

@R0CKH0PP3R

After installing with pip as user, I get the following when trying the usage examples:


Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import upnpclient
>>> devices = upnpclient.discover()
>>> devices
[<Device 'PiFi (UpMpd AV)'>, <Device 'Focal UpMpd AV'>, <Device 'Plex Media Server: odroid'>, <Device 'PiFi (UpMpd OH)'>, <Device 'WFADevice'>, <Device 'BT Home Hub 6.0A'>, <Device 'Focal UpMpd OH'>]
>>> d = devices[0]
>>> d.WANIPConn1.GetStatusInfo()
Traceback (most recent call last):
  File "/home/ahaslam/.local/lib/python3.10/site-packages/upnpclient/upnp.py", line 148, in __getattr__
    return self.service_map[name]
KeyError: 'WANIPConn1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ahaslam/.local/lib/python3.10/site-packages/upnpclient/upnp.py", line 150, in __getattr__
    raise AttributeError("No attribute or service found with name %r." % name)
AttributeError: No attribute or service found with name 'WANIPConn1'.
>>> d.services
[<Service service_id='urn:upnp-org:serviceId:AVTransport'>, <Service service_id='urn:upnp-org:serviceId:RenderingControl'>, <Service service_id='urn:upnp-org:serviceId:ConnectionManager'>]
>>> d.Layer3Forwarding1.actions
Traceback (most recent call last):
  File "/home/ahaslam/.local/lib/python3.10/site-packages/upnpclient/upnp.py", line 148, in __getattr__
    return self.service_map[name]
KeyError: 'Layer3Forwarding1'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ahaslam/.local/lib/python3.10/site-packages/upnpclient/upnp.py", line 150, in __getattr__
    raise AttributeError("No attribute or service found with name %r." % name)
AttributeError: No attribute or service found with name 'Layer3Forwarding1'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions