RunTimeError. Could not initialize camera

Hi, I am using Raspberry Pi NoIR Camera V2 and I am following the NVIDIA Course. I was able to get the ‘hello_camera’ working but was not able to get the camera to work during the Image Classification Course. The error is below:


RuntimeError Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/usb_camera.py in init(self, *args, **kwargs)
23 if not re:
—> 24 raise RuntimeError(‘Could not read image from camera.’)
25

RuntimeError: Could not read image from camera.

During handling of the above exception, another exception occurred:

RuntimeError Traceback (most recent call last)
in
4 # USB Camera (Logitech C270 webcam)
5 from jetcam.usb_camera import USBCamera
----> 6 camera = USBCamera(width=224, height=224, capture_device=0) # confirm the capture_device number
7
8 # CSI Camera (Raspberry Pi Camera Module V2)

/usr/local/lib/python3.6/dist-packages/jetcam-0.0.0-py3.6.egg/jetcam/usb_camera.py in init(self, *args, **kwargs)
26 except:
27 raise RuntimeError(
—> 28 ‘Could not initialize camera. Please see error trace.’)
29
30 atexit.register(self.cap.release)

RuntimeError: Could not initialize camera. Please see error trace.

I have tried shutting down the kernel in JupyterLab and trying it again but it does not help.

hello s10189727,

may I know which JetPack release you’re working with?
thanks

Jetpack 4.4 I assume, is there any way to check?

I managed to fix the error by rebooting my Jetson Nano.

Thanks for the reply.

hello s10189727,

please check your release version via system node.
for example,
$ cat /etc/nv_tegra_release

you may also refer to JetPack Archive for the details.
thanks