I have Raspberry Pi 2 Model B v1.1 (NOOBS v1.4.2 Raspbian loaded), and I installed WebIOPi 0.7.1 to use it in order to blink a LED on attached to GPIO24 and GND by WebIOPi page.
While I tried to use WebIOPi 192.168.n.n/8000 on my browser, I couldn't change the pins to blink my led. Terminal says briefly:
global name "GPIO" is not defined
But my GPIO is loaded correctly. I have already tried this code to update:
sudo apt-get install rpi.gpio
python3-rpi.gpio
Nothing loaded and nothing changed with me. This is my Terminal's screen:
Exception happened during processing of request from ('::ffff:192.168.1.110', 43952, 0, 0)
Traceback (most recent call last):
File "/usr/lib/python2.7/SocketServer.py", line 295, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 321, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/lib/python2.7/SocketServer.py", line 655, in __init__
self.handle()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
self.handle_one_request()
File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
method()
File "build/bdist.linux-armv7l/egg/webiopi/protocols/http.py", line 267, in do_GET
self.processRequest()
File "build/bdist.linux-armv7l/egg/webiopi/protocols/http.py", line 258, in processRequest
except (GPIO.InvalidDirectionException, GPIO.InvalidChannelException, GPIO.SetupException) as e:
NameError: global name 'GPIO' is not defined
----------------------------------------