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 running script #5

Open
avenantsoftware opened this issue Aug 13, 2014 · 7 comments
Open

error running script #5

avenantsoftware opened this issue Aug 13, 2014 · 7 comments

Comments

@avenantsoftware
Copy link

I have this python script:

!/usr/bin/env python

import wifileds

led_connection = wifileds.limitlessled.connect('192.168.2.10', 8899)

led_connection.rgbw.zone_on(1)

wich gives this error:

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

Am I misisng something in the above code?

@joaquincasares
Copy link
Owner

That should have worked:

https://github.com/joaquincasares/python-wifi-leds/blob/master/tests/limitlessled.py#L128

How did you install the package? Try cloning the repo and placing your sample file in the root directory and try again. Perhaps I messed up in the actual packaging process.

@avenantsoftware
Copy link
Author

I installed the python module as instructed:

pip install wifileds

etc...

when i run from terminal: locate wifileds

the files are installed because it returns:

/usr/local/lib/python2.7/dist-packages/wifileds
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info
/usr/local/lib/python2.7/dist-packages/wifileds/init.py
/usr/local/lib/python2.7/dist-packages/wifileds/init.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/README.md
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/init.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/init.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/bridge.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/bridge.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/rgb.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/rgb.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/rgbw.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/rgbw.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/white.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/white.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/init.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/init.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/colorful_strobe.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/colorful_strobe.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/fade_down.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/fade_down.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/fade_up.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/fade_up.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/police_flashers.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/police_flashers.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/pulsating_swells.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/pulsating_swells.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/rainbow_fade.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/rainbow_fade.pyc
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/strobe.py
/usr/local/lib/python2.7/dist-packages/wifileds/limitlessled/effects/strobe.pyc
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info/PKG-INFO
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info/SOURCES.txt
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info/dependency_links.txt
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info/installed-files.txt
/usr/local/lib/python2.7/dist-packages/wifileds-1.0.6.egg-info/top_level.txt

@joaquincasares
Copy link
Owner

What's the exact stacktrace you get when you try to run your code?

Also, did running it in the folder work?

@avenantsoftware
Copy link
Author

Traceback (most recent call last):
File "wifileds.py", line 2, in
import wifileds
File "/home/htpc/Hue/wifileds.py", line 4, in
led_connection = wifileds.limitlessled.connect('192.168.2.10', 8899)
AttributeError: 'module' object has no attribute 'limitlessled'

if the module was not installed correctly, python would give more errors, it only has a problem with the limitlessled part in the code, as if it was not defined

what do you mean by running it from the folder? do there have to be more files in the folder I run the script from, besides that the module is installed?

@joaquincasares
Copy link
Owner

In the meantime, try cloning this repo and running your sample script from the repo's root directory. Let me know if that works for you please.

@avenantsoftware
Copy link
Author

yeah that works

@TheGitLife
Copy link

Hey Guys - I am facing the same issue as spambus got above:
'module' object has no attribute 'limitlessled'

How did you guys fixed it? Also, what do you mean by running the sample script from repo's root directory? I tried running tests\limitless.py from multiple locations, and it always seem to fail.

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

3 participants