-
Notifications
You must be signed in to change notification settings - Fork 156
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
Segmentation Fault running basic examples #276
Comments
can you try a different version of python 3? |
Python 3.9.2 is the version of python bundled into raspbian. In issue 255 the OP was using 3.7.x. Haven’t we moved past the version of python as the issue? I’m curious why rpi4 would be on the list of validated OSes if the library isn’t functional with recent releases of raspbian or the version of python baked into raspbian. Would this be more appropriately marked as a bug? I’m happy to upgrade the python version as a test, but this does not seem like a legitimate fix, raspbian tends to have issues when you upgrade python under it. |
Sounds good, I think it might help fix the, or at least your issue because upgrading/changing Python version has helped before. |
I get the same error, my python version is 3.7, maybe need to close Audio output , you can read this: https://tutorials-raspberrypi.com/connect-control-raspberry-pi-ws2812-rgb-led-strips/ |
Thanks all. I've tried both suggestions, disabling audio output and upgrading to python 3.10.4. After disabling the audio output there is no change in behavior. After upgrading to python and attempting to execute the script, it returns "ModuleNotFoundError: No module named 'luma'". I attempted to reinstall the luma.led_matrix library and my system is choked attempting to install dependencies. Collecting rpi-ws281x × python setup.py egg_info did not run successfully. note: This error originates from a subprocess, and is likely not a problem with pip. I ran
note: This error originates from a subprocess, and is likely not a problem with pip. I'm stuck attempting to install _ctypes, which should be included as part of Python3 from my reading. I think it is safe to say attempting to upgrade python on raspberry pi OS caused a cascade of issues. I'm formatting the SD card and starting over, I was able to install the module with a fresh install of Raspberry Pi OS. |
This is similar to closed issue #255 , I'm experiencing the same error when running a basic example. The panel lights up then immediately goes dark returning the "Segmentation Fault" error in the terminal when running
sudo python3 filename.py
I've formatted the SD Card and used a fresh install of Raspian 32 bit full OS and experienced the same behavior.
I've attempted to update the WS2812 package and am receiving errors when doing so.
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-djflmpk8/ws2812_bb4b8700532f4992a0be6183142b1eea/setup.py'"'"'; file='"'"'/tmp/pip-install-djflmpk8/ws2812_bb4b8700532f4992a0be6183142b1eea/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-lvd2lur5/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/ws2812 Check the logs for full command output.
Python Version
Python 3.9.2
Type of Raspberry Pi
RPI4
Linux Kernel version
Linux raspberrypi 5.15.32-v7l+ #1538 SMP Thu Mar 31 19:39:41 BST 2022 armv7l GNU/Linux
Expected behaviour
LED Matrix Lights as coded
Actual behaviour
LED Matrix lights up and immediately goes dark, terminal returns "Segmentation fault" when the code stops executing. I experience the same behavior whether I define a matrix or LED strip. Worth noting I have no issues when leveraging the adafruit neopixel libraries, the panel behaves as expected.
Here is the basic example I am using.
from luma.core.render import canvas
from luma.led_matrix.device import neopixel
device = neopixel(cascaded=512)
with canvas(device) as draw:
draw.point((0,0), fill="white")
Thanks in advance
The text was updated successfully, but these errors were encountered: