View: 678|Reply: 5

Camera Error in Server.py

[Copy link]

1

Threads

1

Posts

7

Credits

Newbie

Rank: 1

Credits
7
Post time 2019-6-11 00:37:31 | Show all posts |Read mode
Edited by 1560141986 at 2019-6-11 12:38 AM

Follow up with a similar camera issue when executing sudo python3 server.py.

pi@raspberrypi:~/Adeept_PiCar-B/server $ sudo killallpython3
python3: no process found
pi@raspberrypi:~/Adeept_PiCar-B/server $ sudo python3server.py
mmal: mmal_vc_component_create: failed to create component'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component'vc.ril.camera' (1)
Traceback (most recent call last):
  File"/usr/lib/python3/dist-packages/picamera/camera.py", line 456, in_init_camera
    self._camera =mo.MMALCamera()
  File"/usr/lib/python3/dist-packages/picamera/mmalobj.py", line 2279, in__init__
    super(MMALCamera,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, inmmal_check
    raisePiCameraMMALError(status, prefix)
picamera.exc.PiCameraMMALError: Failed to create MMALcomponent b'vc.ril.camera': Out of memory

During handling of the above exception, another exceptionoccurred:

Traceback (most recent call last):
  File"server.py", line 692, in <module>
    camera =picamera.PiCamera()              #Camerainitialization
  File"/usr/lib/python3/dist-packages/picamera/camera.py", line 431, in __init__
   self._init_camera(camera_num, stereo_mode, stereo_decimate)
  File"/usr/lib/python3/dist-packages/picamera/camera.py", line 460, in_init_camera
    "Camera isnot enabled. Try running 'sudo raspi-config' "
picamera.exc.PiCameraError: Camera is not enabled. Tryrunning 'sudo raspi-config' and ensure that the camera has been enabled.

Camera was enabled. What needs to be done to correct this issue? In a response to the previous Camera issue, it was stated to change "Adeept.PiCar-B" to "adeept.PiCar-b".  Please explain the reason for this preposed change to folder name.



Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-6-12 14:52:54 | Show all posts
1. is adeept_picar-b, it's case sensitive
Reply

Use magic Report

0

Threads

69

Posts

412

Credits

Website Editor

Rank: 8Rank: 8

Credits
412
Post time 2019-6-12 14:54:19 | Show all posts
2. check whether there's start_x=1 in /boot/config.txt, see whether it is commented out
Reply

Use magic Report

6

Threads

14

Posts

170

Credits

Registered member

Rank: 2

Credits
170
Post time 2019-6-16 22:16:18 | Show all posts
Hi,
I have same error. Please check if you get the same error if you test your camera with the standard rasping command: "raspistill -o image.jpg"
(see thread "Out of Memory..")
Maybe you have better luck than me.
Reply

Use magic Report

6

Threads

14

Posts

170

Credits

Registered member

Rank: 2

Credits
170
Post time 2019-6-17 00:12:51 | Show all posts
Hi, probably you made the same error as I -> I had the camera connector inserted into the terminal connector instead of the camera one
Reply

Use magic Report

19

Threads

214

Posts

747

Credits

Senior member

Rank: 4

Credits
747
Post time 2021-2-8 15:12:36 | Show all posts
The metal surface of the camera cable is in contact with the metal surface of the camera, The metal surface of the camera cable is in contact with the metal surface of the camera interface of the Raspberry Pi  How to judge whether the camera is connected correctly Please run the command in the terminal: "raspistill -t 1000 -o image.jpg", If the camera is installed correctly, the program will not go wrong, and after running the command "ls", an image file of image.jpg will appear If an error occurs, it means that the camera is not installed correctly or the camera is malfunctioning
Reply

Use magic Report

You have to log in before you can reply Login | Sign Up

Points Rules