Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR - global name 'GPIO' is not defined #134

Open
GoogleCodeExporter opened this issue May 31, 2015 · 8 comments
Open

ERROR - global name 'GPIO' is not defined #134

GoogleCodeExporter opened this issue May 31, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.install webiopi
2.add two line on /etc/webiopi/config [GPIO]
7 = OUT 1
8 = OUT 1
3.sudo webiopi -d -c /etc/webiopi/config
...

WebIOPi version used?
=>0.7.0

Python version used?
=>3.2

Distro used? (WebIOPi has only been tested on Raspbian Wheezy)
=>Raspbian 

Raspberry Pi board revision? (1 or 2)
=>2

For Javascript side bugs, Browser?
=>no

Please provide any additional information below.

pi@pi2garage ~ $ sudo webiopi -d -c /etc/webiopi/config
2015-02-06 22:35:40 - WebIOPi - INFO - Starting WebIOPi/0.7.0/Python3.2
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.digitalCount to REST GET 
/GPIO/count
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.digitalRead to REST GET 
/GPIO/%(channel)d/value
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.digitalWrite to REST POST 
/GPIO/%(channel)d/value/%(value)d
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.getFunctionString to REST 
GET /GPIO/%(channel)d/function
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.getPulse to REST GET 
/GPIO/%(channel)d/pulse
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.outputSequence to REST 
POST /GPIO/%(channel)d/sequence/%(args)s
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.portRead to REST GET 
/GPIO/*/integer
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.portWrite to REST POST 
/GPIO/*/integer/%(value)d
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.pulse to REST POST 
/GPIO/%(channel)d/pulse/
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.pulseAngle to REST POST 
/GPIO/%(channel)d/pulseAngle/%(value)f
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.pulseRatio to REST POST 
/GPIO/%(channel)d/pulseRatio/%(value)f
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.setFunctionString to REST 
POST /GPIO/%(channel)d/function/%(value)s
2015-02-06 22:35:40 - WebIOPi - DEBUG - Mapping GPIO.wildcard to REST GET 
/GPIO/*
2015-02-06 22:35:40 - WebIOPi - INFO - GPIO - Native mapped to REST API /GPIO
2015-02-06 22:35:40 - WebIOPi - INFO - Loading configuration from 
/etc/webiopi/config
2015-02-06 22:35:40 - WebIOPi - ERROR - global name 'GPIO' is not defined
Traceback (most recent call last):
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/__main__.py", line 75, in <module>
    main(sys.argv)
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/__main__.py", line 69, in main
    server = Server(port=port, configfile=configfile, scriptfile=scriptfile)
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/server/__init__.py", line 52, in __init__
    self.gpio.addSetups(config.items("GPIO"))
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/devices/digital/gpio.py", line 62, in addSetups
    self.addGPIOSetup(gpio, params)
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/devices/digital/gpio.py", line 55, in addGPIOSetup
    self.addGPIO(self.gpio_setup, gpio, params)
  File "/usr/local/lib/python3.2/dist-packages/WebIOPi-0.7.0-py3.2-linux-armv7l.egg/webiopi/devices/digital/gpio.py", line 45, in addGPIO
    func = GPIO.OUT
NameError: global name 'GPIO' is not defined



Original issue reported on code.google.com by [email protected] on 7 Feb 2015 at 4:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant