poemusica / rpi-matrix-gif

Display animated gif on Adafruit 32x32 RGB LED Matrix with Raspberry PI
MIT License
32 stars 6 forks source link

Error with rgbmatrix library #2

Closed malani-art closed 2 years ago

malani-art commented 2 years ago

Hi, When I try to run the python file via terminal, I always get this error:

pi@Malani:~/Desktop/rpi-matrix-gif-master $ sudo python displayGIF.py Traceback (most recent call last): File "displayGIF.py", line 18, in from rgbmatrix import Adafruit_RGBmatrix

Is there something wrong with the rgbmatrix import?

Earlier, I had the same issue with the code "import Image" but was able to fix it by changing it to "from PIL import Image"

How can I fix this?

Thanks.

Forianz commented 2 years ago

Hey there! I have the same problem, did u find a solution?

poemusica commented 2 years ago

Thanks for your comments! This project is a few years old. Adafruit may have changed their API. I'll look into it! And thank you for checking out my repo.

poemusica commented 2 years ago

I looked into the issue over the weekend and figured out what broke my script.

I originally wrote the script in 2016. Since then there have been some changes to the dependencies. Notably, Adafruit's fork of the rpi-rgb-led-matrix library is now deprecated. Adafruit's installer script now uses the rpi-rgb-led-matrix repo instead.

I'm working on updating my script to work with the new version of the rgbmatrix library. (I also had to troubleshoot some issues getting the library to build.) I'll post another update when I've fixed my script. Thanks!

malani-art commented 2 years ago

Hey @Forianz, what @poemusica wrote is what I figured. This script is old and the Adafruit RGB repo has changed since. Nice to hear that @poemusica will be updating this! In the meantime, @Forianz, I ended up and recommend using this instead: https://github.com/DIYCharles/RGBGIFSlideshow I faced a few issues but it worked for me at the end. Few things you should do to avoid those issues:

  1. install graphicsmagick-libmagick-dev-compat
  2. add --led-no-hardware-pulse to the shell script file if you get an error about audio

Good luck!

poemusica commented 2 years ago

I updated the script today 🙂

It now works with Raspberry Pi OS and Adafruit's newer installation script which includes a different version of the rgbmatrix library.

(I'm still working on updating my README to reflect the changes. I'll close this issue when I've finished correcting the README.)

poemusica commented 2 years ago

✅ README update