PiCamera 无论如何都没有资源

问题描述 投票:0回答:1

我开始尝试官方测试代码;

from picamera import PiCamera
from time import sleep

camera = PiCamera()
camera.start_preview()
sleep(5)
camera.stop_preview()

我收到了这个错误;

picamera.exc.PiCameraMMALError: Failed to enable connection: Out of resources

这是在重新启动后立即进行的,没有运行脚本或进程,通过终端和 Raspberry Pi 配置应用程序在 raspi-config 中启用了摄像头验证,GPU 内存增加到 256。我知道摄像头可以工作,因为我可以使用 RPi Cam Web界面并查看相机源就好了(我后来卸载了它,看看它是否有冲突,显然不是。)我已经更新和升级了,即使我想运行,我也无法运行 rpi_update 因为它当我输入“y”继续时,显示“指定的 git 哈希无效”。我已达到故障排除的极限,Reddit 立即删除了我的帖子,因为机器人说我没有研究。

通过命令提示符,我在基础级别上进行了一些基本的故障排除。直接从控制台复制:

pi@raspberrypi:~ $ vcgencmd get_camera
supported=1 detected=1
pi@raspberrypi:~ $ raspistill -o image.jpg
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
pi@raspberrypi:~ $ 
python raspberry-pi camera
1个回答
0
投票

我感受到你的痛苦。

MMAL 的东西通常意味着其他东西正在使用相机,或者相机认为。

您很幸运没有收到超时错误。 Raspberry Pi 中根本没有人关心这个。

© www.soinside.com 2019 - 2024. All rights reserved.