iancmcc / ouimeaux

Python API to Belkin WeMo devices
http://pypi.python.org/pypi/ouimeaux
BSD 3-Clause "New" or "Revised" License
575 stars 150 forks source link

Error Messages with Debian Wheezy on Udoo Board #33

Closed ghost closed 10 years ago

ghost commented 10 years ago

Hello, I really like the ouimeaux project and was using it for quite some time now on my Raspberry Pi (Arch Linux). Now I am migrating this system to the Udoo Quad Board (running Debian Wheezy minimal). But I am getting error messages after running the 'wemo server' command and have no idea why. Could someone be so kind and point me in the right direction? Thanks

$wemo server

DEPRECATION WARNING: use resource instead of namespace INFO:ouimeaux.environment:Discovering devices INFO:ouimeaux.environment:Found device at ('10.0.1.50', 56065) INFO:ouimeaux.environment:Unrecognized device type. USN=uuid:0011320e-613c-0011-3c61-3c610e321100::upnp:rootdevice INFO:ouimeaux.environment:Found device at ('10.0.1.145', 3088) INFO:ouimeaux.subscribe:Subscribing to basic events from (<WeMo Motion "Motion Alarm">,) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent-1.1-py2.7-linux-armv7l.egg/gevent/greenlet.py", line 327, in run result = self._run(_self.args, _self.kwargs) File "/usr/local/lib/python2.7/dist-packages/pysignals-0.1.2-py2.7.egg/pysignals/dispatcher.py", line 197, in send response = receiver(signal=self, sender=sender, _named) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 138, in _found_device self._process_device(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 152, in _process_device self.registry.register(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 32, in register self._resubscribe(device.basicevent.eventSubURL) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 46, in _resubscribe headers=headers) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 40, in request return s.request(method=method, url=url, *_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 164, in request headers[k] = header_expand(v) File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 226, in header_expand for i, (value, params) in enumerate(headers): TypeError: 'int' object is not iterable <Greenlet at 0xa82ad0: <bound method Signal.send of <pysignals.dispatcher.Signal object at 0x3d7b70>>(<ouimeaux.discovery.UPnP object at 0xa80cb0>, headers={'opt': '"http://schemas.upnp.org/upnp/1/0/"; ns=0, address=('10.0.1.145', 3088))> failed with TypeError

INFO:ouimeaux.environment:Found device at ('10.0.1.126', 3382) INFO:ouimeaux.subscribe:Subscribing to basic events from (<WeMo Switch "Alarmsystem">,) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent-1.1-py2.7-linux-armv7l.egg/gevent/greenlet.py", line 327, in run result = self._run(_self.args, _self.kwargs) File "/usr/local/lib/python2.7/dist-packages/pysignals-0.1.2-py2.7.egg/pysignals/dispatcher.py", line 197, in send response = receiver(signal=self, sender=sender, _named) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 138, in _found_device self._process_device(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 152, in _process_device self.registry.register(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 32, in register self._resubscribe(device.basicevent.eventSubURL) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 46, in _resubscribe headers=headers) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 40, in request return s.request(method=method, url=url, *_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 164, in request headers[k] = header_expand(v) File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 226, in header_expand for i, (value, params) in enumerate(headers): TypeError: 'int' object is not iterable <Greenlet at 0xb6f7b0: <bound method Signal.send of <pysignals.dispatcher.Signal object at 0x3d7b70>>(<ouimeaux.discovery.UPnP object at 0xa80cb0>, headers={'opt': '"http://schemas.upnp.org/upnp/1/0/"; ns=0, address=('10.0.1.126', 3382))> failed with TypeError

INFO:ouimeaux.environment:Found device at ('10.0.1.120', 4183) INFO:ouimeaux.subscribe:Subscribing to basic events from (<WeMo Switch "Gaggia Coffee Classic">,) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent-1.1-py2.7-linux-armv7l.egg/gevent/greenlet.py", line 327, in run result = self._run(_self.args, _self.kwargs) File "/usr/local/lib/python2.7/dist-packages/pysignals-0.1.2-py2.7.egg/pysignals/dispatcher.py", line 197, in send response = receiver(signal=self, sender=sender, _named) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 138, in _found_device self._process_device(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 152, in _process_device self.registry.register(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 32, in register self._resubscribe(device.basicevent.eventSubURL) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 46, in _resubscribe headers=headers) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 40, in request return s.request(method=method, url=url, *_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 164, in request headers[k] = header_expand(v) File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 226, in header_expand for i, (value, params) in enumerate(headers): TypeError: 'int' object is not iterable <Greenlet at 0xb6f850: <bound method Signal.send of <pysignals.dispatcher.Signal object at 0x3d7b70>>(<ouimeaux.discovery.UPnP object at 0xa80cb0>, headers={'opt': '"http://schemas.upnp.org/upnp/1/0/"; ns=0, address=('10.0.1.120', 4183))> failed with TypeError

INFO:ouimeaux.environment:Found device at ('10.0.1.146', 3319) INFO:ouimeaux.subscribe:Subscribing to basic events from (<WeMo Switch "Hifi Rack">,) Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent-1.1-py2.7-linux-armv7l.egg/gevent/greenlet.py", line 327, in run result = self._run(_self.args, _self.kwargs) File "/usr/local/lib/python2.7/dist-packages/pysignals-0.1.2-py2.7.egg/pysignals/dispatcher.py", line 197, in send response = receiver(signal=self, sender=sender, _named) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 138, in _found_device self._process_device(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/environment.py", line 152, in _process_device self.registry.register(device) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 32, in register self._resubscribe(device.basicevent.eventSubURL) File "/usr/local/lib/python2.7/dist-packages/ouimeaux-0.7.2-py2.7.egg/ouimeaux/subscribe.py", line 46, in _resubscribe headers=headers) File "/usr/lib/python2.7/dist-packages/requests/api.py", line 40, in request return s.request(method=method, url=url, *_kwargs) File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 164, in request headers[k] = header_expand(v) File "/usr/lib/python2.7/dist-packages/requests/utils.py", line 226, in header_expand for i, (value, params) in enumerate(headers): TypeError: 'int' object is not iterable <Greenlet at 0xb6ff30: <bound method Signal.send of <pysignals.dispatcher.Signal object at 0x3d7b70>>(<ouimeaux.discovery.UPnP object at 0xa80cb0>, headers={'opt': '"http://schemas.upnp.org/upnp/1/0/"; ns=0, address=('10.0.1.146', 3319))> failed with TypeError

iancmcc commented 10 years ago

Hmm, looks like I need to be more defensive passing those headers through.

iancmcc commented 10 years ago

This should be fixed by https://github.com/iancmcc/ouimeaux/commit/2189d4862630021edd546c5c1e60126e8b7cb6dc.