Exception: Cannot find any webcams on Raspberry Camera module V3

I am attempting to execute the local model on a Raspberry Pi 4 and a Raspberry Pi Camera Module V3. The camera is functioning correctly when used with edge-impulse-linux and edge-impulse-runner. However, upon running classify.py from the Linux Python SDK, I encountered this exception.(Tried by both enabling and disabling the legacy camera with proper reboot)

MODEL: /home/pi/modelfile.eim
Loaded runner for "Nik / Bill_New"
Looking for a camera in port 0:
Looking for a camera in port 1:
[ WARN:0@0.584] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video1): can't open camera by index
[ERROR:0@0.596] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range
Looking for a camera in port 2:
[ WARN:0@0.597] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video2): can't open camera by index
[ERROR:0@0.611] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range
Looking for a camera in port 3:
[ WARN:0@0.612] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video3): can't open camera by index
[ERROR:0@0.623] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range
Looking for a camera in port 4:
[ WARN:0@0.624] global cap_v4l.cpp:982 open VIDEOIO(V4L2:/dev/video4): can't open camera by index
[ERROR:0@0.635] global obsensor_uvc_stream_channel.cpp:156 getStreamChannelGroup Camera index out of range
Traceback (most recent call last):
  File "/home/pi/linux-sdk-python/examples/image/classify.py", line 129, in <module>
    main(sys.argv[1:])
  File "/home/pi/linux-sdk-python/examples/image/classify.py", line 81, in main
    raise Exception('Cannot find any webcams')
Exception: Cannot find any webcams

Hi @Tony_sebastian

This appears to be an open issue on the opencv repo. Can you have a look at the following issue, and steps outlined to see if any can resolve your issue?

You have said the camera is working, however it needs to be seen by OpenCV for this script, can you run this and post the output?:

vcgencmd get_camera

v4l2-ctl --list-devices

If you find the index of your camera you can replace port in this line to the index your camera is located at e.g. 0:

Best

Eoin