1

I downloaded the WebIOPi-0.6.0.tar.gz from the web and extract it and ran the setup.sh. After installation when i run sudo webiopi it displays this..

ralph@ralph-desktop:~$ sudo webiopi
Traceback (most recent call last): 
  File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details return _get_module_details(pkg_main_name, error)
  File "/usr/lib/python3.5/runpy.py", line 109, in _get_module_details __import__(pkg_name)
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.6.0-py3.5-linux-armv7l.egg/webiopi/__init__.py", line 17, in <module>
  import _webiopi.GPIO as GPIO
_webiopi.GPIO.SetupException: This module can only be run on a Raspberry Pi!

what seems to be wrong? i tried to reinstall it but the problem is still present.

Edited

I ran the code by @Codino and got this result.

ralph@ralph-desktop:~/WebIOPi-0.7.1$ sudo webiopi
2016-07-21 03:11:12 - WebIOPi - INFO - Starting WebIOPi/0.7.22/Python3.5
2016-07-21 03:11:12 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2016-07-21 03:11:12 - WebIOPi - INFO - DigitalActuator - LightSwitch mapped to REST API /devices/IJFottwtJsEzH8wF
2016-07-21 03:11:12 - WebIOPi - WARNING - Access unprotected
2016-07-21 03:11:12 - WebIOPi - ERROR - [Errno 98] Address already in use
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/protocols/http.py", line 45, in __init__
BaseHTTPServer.HTTPServer.__init__(self, ("", port), HTTPHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
  File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/__main__.py", line 77, in <module>
main(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/__main__.py", line 70, in main
server = Server(port=port, configfile=configfile, scriptfile=scriptfile)
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/server/__init__.py", line 120, in __init__
self.http_server = http.HTTPServer(self.host, http_port, self.restHandler, context, docroot, index, auth, realm)
  File "/usr/local/lib/python3.5/dist-packages/WebIOPi-0.7.22-py3.5-linux-armv7l.egg/webiopi/protocols/http.py", line 48, in __init__
BaseHTTPServer.HTTPServer.__init__(self, ("", port), HTTPHandler)
  File "/usr/lib/python3.5/socketserver.py", line 440, in __init__
self.server_bind()
  File "/usr/lib/python3.5/http/server.py", line 138, in server_bind
socketserver.TCPServer.server_bind(self)
  File "/usr/lib/python3.5/socketserver.py", line 454, in server_bind
self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Ralph
  • 550
  • 3
  • 10
  • 25

1 Answers1

0

Because the version you've used was not compatible. Try this.

$ wget http://sourceforge.net/projects/webiopi/files/WebIOPi-0.7.1.tar.gz
$ tar xvzf WebIOPi-0.7.1.tar.gz
$ cd WebIOPi-0.7.1
$ wget https://raw.githubusercontent.com/doublebind/raspi/master/webiopi-pi2bplus.patch
$ patch -p1 -i webiopi-pi2bplus.patch
$ sudo ./setup.sh
Van Tr
  • 5,889
  • 2
  • 20
  • 44
  • still error, please see the edited part, i've copied the result there when i ran the commands – Ralph Jul 20 '16 at 19:13
  • does samba server have anything to do with this? or does having a NAS in the raspberry pi be the possible reason? because i'm running a NAS server with my pi – Ralph Jul 20 '16 at 19:15
  • @Ralph yes, it could be. I recommend disable other server service to test WebIOPi first, then if it works well you could use them all by changing the port of the servers. – Van Tr Jul 21 '16 at 05:03
  • hey i tried changing to port to 8000 and it doesn't give me the error on top but when i go to http://raspi-ip:8001 it just displays a blank screen – Ralph Jul 22 '16 at 18:09