Diddyborg Red follow ball camera issues
Forums:
I have a Diddyborg Red from about 3 years ago. I've just tried to run the follow ball example but keep getting a camera error
Libraries loaded
Loading PicoBorg Reverse on bus 1, address 44
Found PicoBorg Reverse at 44
PicoBorg Reverse loaded on bus 1
Setup camera
mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
Traceback (most recent call last):
File "./diddyRedFollowBall.py", line 193, in
camera = picamera.PiCamera()
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 488, in __init__
self.STEREO_MODES[stereo_mode], stereo_decimate)
File "/usr/lib/python2.7/dist-packages/picamera/camera.py", line 620, in _init_camera
prefix="Camera component couldn't be enabled")
File "/usr/lib/python2.7/dist-packages/picamera/exc.py", line 191, in mmal_check
raise PiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Camera component couldn't be enabled: Out of resources (other than memory)
Does anyone know what I need to do to fix this? The camera works through the WEB UI.
Thanks
Alan
piborg
Fri, 03/30/2018 - 20:43
Permalink
Camera error: Out of resources
Since the camera itself is working the most likely cause would be trying to run two scripts trying to use the camera at the same time. In that situation the first script will run fine, but the second will fail to open the camera as it is already in use.
In this case I suspect you have the Web UI still running when trying to use the ball following script. You will need to either end the Web UI script or prevent it from running at startup before the other script will run :)