Closed grooverkm closed 3 years ago
That error is coming from the waveshare library itself. When is the last time you built that library? Waveshare doesn't put version numbers on things but there have been some changes in the past several months. Might be worth re-installing to see if that fixes the issue. Another thing to check is that SPI is enabled properly, assuming it is since you said it was previously working but worth a check. bad file descriptor
points to an issue accessing the hardware from the driver.
I also have a 7in5_V2 screen and tested running the latest main
branch over several update cycles and it is working for me. I did just rebuild the Waveshare lib though this morning.
I believe it's this line from the Manual Install Instructions that'll rebuild that library, @robweber correct me if I'm mistaken please.
sudo pip3 install git+https://github.com/waveshare/e-Paper.git#egg=waveshare-epd&subdirectory=RaspberryPi_JetsonNano/python
But shouldn't the upgrade script run that? Puzzling..
Rebuilding the library fixed it, thank you! I had to delete the existing library as I was unable to update it directly, so once I did that and ran the install script and it worked fine. Incidentally, simply running the script to upgrade did not appear to update the waveshare library.
I wish Waveshare used version numbers. Since they don't the version always comes in as 0.0.0. When you re-run the script it sees the same version, assumes the code is the same, and won't rebuild.
@qubist - maybe something for us to address as part of the update script. Maybe always uninstall/reinstall waveshare? Takes up time but might save headaches.
Great to hear! I'm making a new issue to track this behavior so maybe in the future upgrading like you did would have resolved the problem. Thanks for reporting back the resolution
Let's discuss options for resolving the underlying issue in #70!
Describe the Problem Previously running 0.2 without any problems, ran the upgrade script last night. Program will run correctly on screen (7in5_V2) but will not advance beyond the first frame.
pi@raspberrypi:~ $ python3 /home/pi/SlowMovie/slowmovie.py '/home/pi/SlowMovie' read from nowPlaying file couldn't be found. Removing nowPlaying directory for recreation. Update interval: 120 Frame increment: 4 Playing 'a_test.mp4' Video info: 50 frames, 24.125fps, duration: 00:00:02 This video will take 25.0 minute(s) to play. Traceback (most recent call last): File "/home/pi/SlowMovie/slowmovie.py", line 352, in
epd.init()
File "/usr/local/lib/python3.7/dist-packages/waveshare_epd-0.0.0-py3.7.egg/waveshare_epd/epd7in5_V2.py", line 78, in init
if (epdconfig.module_init() != 0):
File "/usr/local/lib/python3.7/dist-packages/waveshare_epd-0.0.0-py3.7.egg/waveshare_epd/epdconfig.py", line 71, in module_init
self.SPI.max_speed_hz = 4000000
OSError: [Errno 9] Bad file descriptor
pi@raspberrypi:~ $
(test.mp4 renamed to appear as the first file in the default Videos dir)
I have deleted and installed from scratch but seem to still have the same result, and also with other files that I know worked for months on 0.2. System is up-to-date.
Any pointers that can help please?