mryel00 / spyglass

A simple mjpeg server for Picamera2
GNU General Public License v3.0
68 stars 15 forks source link

was working until last apt upgrade has been done for bullseye on my raspi 5 using picamera module 3 #70

Open markusbrand opened 7 months ago

markusbrand commented 7 months ago

previously it worked fine, but I did an "sudo apt update and upgrade" a few days ago and now I'm getting the following error:

Traceback (most recent call last): File "/home/pi/spyglass/./run.py", line 3, in from spyglass.cli import main File "/home/pi/spyglass/spyglass/cli.py", line 10, in import libcamera File "/usr/lib/python3/dist-packages/libcamera/init.py", line 4, in from ._libcamera import * ImportError: /usr/lib/python3/dist-packages/libcamera/_libcamera.cpython-311-aarch64-linux-gnu.so: undefined symbol: _ZN9libcamera8controls3rpi15PispStatsOutputE

My OS: Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm

mryel00 commented 7 months ago

I don't think that you got Bullseye on a Pi5, but if you really have Bullseye instead of Bookworm, then you got another problem first. I tested it and it still does work for me. Overall your error isn't spyglass directly but something from libcamera. Make sure you got following apt packages installed: python3-libcamera python3-kms++ python3-picamera2 python3-v4l2

markusbrand commented 7 months ago

Hi, thanks for your feedback - of course you are right it's the latest bookworm - I adjusted it in the headline. All these packages are installed, as said it worked before. still the same issue unfortunately.

mryel00 commented 7 months ago

I tested it on my Pi5. My packages are all up to date and it works without problems. A small research mentioned some version mismatch for python3-libcamera and libcamera that can lead to such an error. Recently there were some updates to some of the libcamera packages creating various issues. I wouldn't wonder if one of those updates created a version mismatch at least in some scenarios, leading to your error. So you might want to try to remove those packages and reinstall them, to see if it's working again.

markusbrand commented 7 months ago

Thank you for your help! I uninstalled python3-libcamera and installed it again, but still same issue unfortunately. Do you know what exact packages I need to remove and install again? I also found a post for this issue where they said I need to setup Raspberry Pi again from scratch - this I want to avoid of course as I have many tweaks and setups on there. Thanks again for your help - even though it's not a spyglass issue.

mryel00 commented 7 months ago

No, I don't know which exact package. As it's a version mismatch between python3-libcamera and libcamera, it should be one of those two. As you tried the python one, try the other one too. If uninstalling isn't possible, you might want to try to just downgrade the package a few versions. Hard to test for me atm, as I don't want to break my installation and I don't have any spare sdcards.