GithubHelp home page GithubHelp logo

Fresh install isn't working about led-control HOT 5 CLOSED

jackw01 avatar jackw01 commented on August 16, 2024
Fresh install isn't working

from led-control.

Comments (5)

jackw01 avatar jackw01 commented on August 16, 2024

I recently had an issue doing a fresh install of this and changed ledcontrol/rpi_ws281x/__init__.py to fix it, but I'm not sure why the fix was necessary or why it even fixed anything.

Can you try replacing the contents of /home/pi/led-control/ledcontrol/rpi_ws281x/__init__.py with this?

# led-control WS2812B LED Controller Server
# Copyright 2019 jackw01. Released under the MIT License (see LICENSE for details).

from .rpi_ws281x import PixelStrip, Color
from .lib.rpi_ws281x import (
    blackbody_to_rgb,
    blackbody_correction_rgb,
    wave_pulse,
    wave_triangle,      
    wave_sine,
    wave_cubic,
    plasma_sines,       
    plasma_sines_octave,
    perlin_noise_3d,    
)

__version__ = '4.2.2'

If this doesn't work, the issue is likely something with the build process for the C extension module.

from led-control.

m-seker avatar m-seker commented on August 16, 2024

I get the following if I replace the contents of init.py:

/usr/local/lib/python3.7/dist-packages/_rpi_ws281x.cpython-37m-arm-linux-gnueabihf.so
Traceback (most recent call last):
  File "/usr/local/bin/ledcontrol", line 11, in <module>
    load_entry_point('led-control', 'console_scripts', 'ledcontrol')()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2793, in load_entry_point
    return ep.load()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2411, in load
    return self.resolve()
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2417, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/pi/led-control/ledcontrol/__init__.py", line 7, in <module>
    from ledcontrol.app import create_app
  File "/home/pi/led-control/ledcontrol/app.py", line 10, in <module>
    from ledcontrol.animationcontroller import AnimationController
  File "/home/pi/led-control/ledcontrol/animationcontroller.py", line 12, in <module>
    import ledcontrol.animationpatterns as patterns
  File "/home/pi/led-control/ledcontrol/animationpatterns.py", line 8, in <module>
    import ledcontrol.rpi_ws281x as rpi_ws281x
  File "/home/pi/led-control/ledcontrol/rpi_ws281x/__init__.py", line 5, in <module>
    from .lib.rpi_ws281x import (
  File "/home/pi/led-control/ledcontrol/rpi_ws281x/lib/rpi_ws281x.py", line 255, in <module>
    class color_hsv(_object):
  File "/home/pi/led-control/ledcontrol/rpi_ws281x/lib/rpi_ws281x.py", line 261, in color_hsv
    __swig_setmethods__["hue"] = _rpi_ws281x.color_hsv_hue_set
AttributeError: module '_rpi_ws281x' has no attribute 'color_hsv_hue_set'

Any idea ?

from led-control.

WhiteyFord avatar WhiteyFord commented on August 16, 2024

Great project mate ..... I'm having the exact same issue.

from led-control.

jackw01 avatar jackw01 commented on August 16, 2024

@WhiteyFord cannot reproduce, what version of Raspberry Pi OS are you running and are you following the exact setup instructions in README.md?

When I run it, the first line printed is /home/pi/led-control/_rpi_ws281x.cpython-37m-arm-linux-gnueabihf.so instead of /usr/local/lib/python3.7/dist-packages/_rpi_ws281x.cpython-37m-arm-linux-gnueabihf.so which indicates that something is different about how it was installed. The _rpi_ws281x binary does not end up in /usr/local/lib/python3.7/dist-packages on my test devices.

from led-control.

jackw01 avatar jackw01 commented on August 16, 2024

Got a chance to test this with a fresh install of the latest version of Raspberry Pi OS. It did not have any issues installing when I followed the directions in README.md.

from led-control.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.