-
Notifications
You must be signed in to change notification settings - Fork 150
error when run as root #18
Comments
You sure it happens when you run it as root but not otherwise? Doesn’t make a lot of sense; that exception indicates that the device isn’t responding within the retry limit. -- Ian On Saturday, 7 December 2013 at 11:38, dauthiatull wrote:
|
yes I had to run it as root because of the rpi gpio needs root but I would get that error unless I run it with |
Same deal for me. I had a script running beautifully and it began failing after a couple of days. I changed it to run using the sudo -E switch and it now works flawlessly. I'm a noob, too, though, so I can't explain it. |
Taking a look at this shortly. I'll be doing a largish release in the next week. — Ian On Sat, Jan 4, 2014 at 2:50 PM, bradmccormick [email protected]
|
I'm pretty sure this happened because you had good cache as one user and bad cache as root. So when you didn't do -E, $HOME was /root and it would use the bad cache. In which case, it's roughly a dupe of #26 and is thereby fixed. Please reopen if it recurs. |
using this on the raspberry pi
i can get it to work as user but need to run it as root so I can us the gpio eg;
sudo python myscript.py
but when run with sudo I get
Traceback (most recent call last):
File "testoui.py", line 10, in
env.start()
File "/usr/local/lib/python2.7/dist-packages/ouimeaux/environment.py", line 66, in start
self._process_device(dev, cache=False)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux/environment.py", line 133, in _process_device
self.registry.register(device)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux/subscribe.py", line 29, in register
self._resubscribe(device.basicevent.eventSubURL)
File "/usr/local/lib/python2.7/dist-packages/ouimeaux/subscribe.py", line 43, in _resubscribe
headers=headers)
File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 361, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 464, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 356, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.191', port=49154): Max retries exceeded with url: /upnp/event/basicevent1 (Caused by <class 'socket.error'>: [Errno 111] Connection refused)
I can fix it by using sudo -E. this allows it to run correctly while allowing me to still access the gpio.
can you explain this to me. I am a complete noob.
The text was updated successfully, but these errors were encountered: