picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': I/O error
See original GitHub issueI’m using Raspberry Pi 3 Model B+.
vcgencmd get_camera
gives me supported=1 detected=1
raspistill -o test.jpg
gives me the test.jpg file but also gives this message
mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7)
mmal: Failed to create camera_info component
Then, I try to run this python code below, but it gives me this error message
from picamera import PiCamera
camera = PiCamera()
Error:
mmal: mmal_vc_shm_init: could not initialize vc shared memory service
mmal: mmal_vc_component_create: failed to initialise shm for 'vc.camera_info' (7:EIO)
mmal: mmal_component_create_core: could not create component 'vc.camera_info' (7)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/picamera/camera.py", line 367, in __init__
with mo.MMALCameraInfo() as camera_info:
File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2346, in __init__
super(MMALCameraInfo, self).__init__()
File "/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 633, in __init__
prefix="Failed to create MMAL component %s" % self.component_type)
File "/usr/lib/python3/dist-packages/picamera/exc.py", line 184, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': I/O error
Issue Analytics
- State:
- Created 2 years ago
- Comments:28
Top Results From Across the Web
Failed to create MMAL component b'vc.ril.camera': Out of ...
This error was resolved when I disconnected and reconnected my camera module. Somehow my camera module must have been wiggled loose when I ......
Read more >picamera Failed to create MMAL component b'vc.camera_info'
from picamera import PiCamera cam = PiCamera(). and get error: picamera Failed to create MMAL component b'vc.camera_info': Function not ...
Read more >failed to create component 'vc.ril.camera' (1:ENOMEM)'
Problem: You are trying to acess the Raspberry Pi camera using raspistill or raspivid , but you see an error message like this:....
Read more >PiCamera() error. How do I fix this problem? - Stack Overflow
... raise PiCameraMMALError(status, prefix) picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': I/O error.
Read more >16. API - mmalobj — Picamera 1.13 Documentation
Control ports are used to accept and receive commands, configuration parameters, and error messages. All MMAL components have a control port, but in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@6by9
I really don’t believe that this is the right way for the RPi Foundation to communicate such a big change, and I understand why many are frustrated with it.
There are thousands of scripts and examples out there that reference
picamera
, and they have been written over many years. There are even Android apps built around the way picamera streams video feeds. I have built many pieces of automation that leveragepicamera
to stream and record video between devices, and they’ve all been broken by the bullseye upgrade.You can’t get away with a random blog post that says “hey guys, FYI we’ve decided to completely kill the old picamera API, we’ll let you know as soon as we have time how you are supposed to migrate your scripts”. You can’t even expect people to go through blog posts before a dist-upgrade to validate whether anything is going to break upon reboot. This is the best way to get developers pissed, and it has another unfortunate precedent (the way the omxplayer layer has been left to break and rot on its own without viable alternatives). What I would have expected:
picamera
relevant pages (Github, documentation and pypi) should have reported, in big capital letters and with reasonable notice before bullseye was released as a new stable, WARNING: This library is deprecated and is going to break in bullseye, [link to migration steps here]. If people are opening issues on this topic, it probably means that a breaking change wasn’t properly communicated.picamera
on bullseye that clearly warns the user about the deprecation.picamera
module provides an API that makes it easier to e.g. start a video stream or record with a preview even for a beginner, without having to mangle with ffmpeg/gstreamer/v4l2/gtk internals. Thepicamera
module could have simply relied on e.g. a gstreamer wrapper instead of the proprietary interface, while providing the same external interface to maintain back-compatibility with previously written software. I’m pretty sure that lots of beginners out there would have loved a back-compatible way of writing a script to stream a camera feed in three lines of code.We’re all happy to see the RPi software finally transition towards a more open-source approach, leaving behind legacy and hard-to-debug software like picamera or omxplayer. But we also expect the alternatives to be properly documented and supported. Many people out there rely on RPi software for stuff like media or camera playback: you can’t just break their software without providing and documenting the alternatives.
You can still enable the legacy stack, but the default is now libcamera. https://forums.raspberrypi.com/viewtopic.php?t=323390
Python bindings for libcamera are already in the works.