最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

raspberry pi - Sudden Picamera2 import failure - Stack Overflow

programmeradmin2浏览0评论

I have a script that utilizes picamera on a raspberry pi 5. It's been working great for months, the all of sudden it started throwing errors. Here is the start of the script

# Import libraries
import os
import time
import sys
import requests
from picamera2 import PiCamera

There are a bunch of comment lines before that, documenting the purpose of the script, how it works, etc., but those are the first real lines in the script. The script is now dying on that last import line with this error

siggib@raspberrypi3D:~/prusacam $ python prusacam.py 
Traceback (most recent call last):
  File "/home/siggib/prusacam/prusacam.py", line 17, in <module>
    from picamera2 import PiCamera
  File "/usr/lib/python3/dist-packages/picamera2/__init__.py", line 3, in <module>
    import libcamera
ValueError: source code string cannot contain null bytes
siggib@raspberrypi3D:~/prusacam $ python -V
Python 3.11.2
siggib@raspberrypi3D:~/prusacam $ 

The only thing that has changed lately is a few apt update to keep the system up to date, other than that nothing has changed. There was a power outage the other day but the system appears to be unaffected.

Anyone have any leads on what might have broken?

发布评论

评论列表(0)

  1. 暂无评论