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

Think I've done something wrong (AttributeError: 'module' object has no attribute etc) #54

Closed
alexellis opened this issue May 11, 2016 · 1 comment

Comments

@alexellis
Copy link

alexellis commented May 11, 2016

Think I've done something wrong here I am getting an error for all the methods on the unicorn library.

Expected: LEDs to turn on etc

Actual:

AttributeError: 'module' object has no attribute 'set_pixel'

AttributeError: 'module' object has no attribute 'show'

pi@dac:~/unicorn-hat/python/examples $ sudo pip2 install --upgrade unicornhat
Requirement already up-to-date: unicornhat in /usr/local/lib/python2.7/dist-packages/unicornhat-2.1.0-py2.7.egg
Requirement already up-to-date: rpi-ws281x>=2.0.0 in /usr/local/lib/python2.7/dist-packages/rpi_ws281x-2.0.1-py2.7-linux-armv6l.egg (from unicornhat)
Cleaning up...
pi@dac:~/unicorn-hat/python/examples $ sudo python2
Python 2.7.9 (default, Mar  8 2015, 00:52:26) 
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import unicornhat as uh
>>> uh.show()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'show'
>>> 

Few more:

pi@dac:~/unicorn-hat/python/examples $ python2 clock.py 
Traceback (most recent call last):
  File "clock.py", line 33, in <module>
    unicorn.rotation(0)
AttributeError: 'module' object has no attribute 'rotation'
pi@dac:~/unicorn-hat/python/examples $ python2 simple.py 
Traceback (most recent call last):
  File "simple.py", line 8, in <module>
    UH.set_pixel(x,y,255,0,255)
AttributeError: 'module' object has no attribute 'set_pixel'
pi@dac:~/unicorn-hat/python/examples $ python2 snow.py 
Traceback (most recent call last):
  File "snow.py", line 12, in <module>
    unicorn.brightness(0.4)
AttributeError: 'module' object has no attribute 'brightness'
pi@dac:~/unicorn-hat/python/examples $ 
@alexellis
Copy link
Author

Remove + install fixed.

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

No branches or pull requests

1 participant