Issue #026 [Duplicate/closed] - Cannot start with no access to DNS

Posted by josephhaig

What steps will reproduce the problem?

  1. Disconnect from access to DNS
  2. Start webiopi with: "sudo python -m webiopi"

What is the expected output? What do you see instead? The expected response is that webiopi starts normally with the hostname set to 'localhost'

Actual response: pi@raspberrypi ~/webiopi/WebIOPi-0.5.3 $ sudo python -m webiopi Traceback (most recent call last): File "/usr/lib/python2.7/", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/", line 72, in _run_code exec code in run_globals File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.3-py2.7-linux-armv6l.egg/", line 489, in <module> main(sys.argv) File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.3-py2.7-linux-armv6l.egg/", line 481, in main server = Server(port=port, passwdfile=passwdfile) File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.3-py2.7-linux-armv6l.egg/", line 106, in __init__ = getLocalIP() File "/usr/local/lib/python2.7/dist-packages/WebIOPi-0.5.3-py2.7-linux-armv6l.egg/", line 98, in getLocalIP except (socket.error, e): NameError: global name 'e' is not defined

What version of the product are you using? On what operating system? 0.5.3 on Raspbian

Please provide any additional information below. The fix is the change line 98 of python/ to:

except socket.error as e:

and reinstall. I found I had to manually remove the directory python/build before the setup would reinstall correctly.

Comment 1

Posted by trouch