IMX298 on RaspberryPi 4 buster

Hello and thank you for the help. I’m trying to set up the IMX298 on RaspberryPi 4 running Buster and running into a problem. I’m trying to run the MIPI_Camera/RPI/python/video.py script i get the following error:

/home/larf/.virtualenvs/cv/bin/python /home/larf/MIPI_Camera/RPI/python/video.py
Traceback (most recent call last):
File “/home/larf/MIPI_Camera/RPI/python/video.py”, line 2, in <module>
import v4l2 #sudo pip install v4l2
File “/home/larf/.virtualenvs/cv/local/lib/python3.7/site-packages/v4l2.py”, line 197, in <module>
) = range(1, 9) + [0x80]
TypeError: unsupported operand type(s) for +: ‘range’ and ‘list’

Process finished with exit code 1

Any advice?

 

 

Hi, @piperlarf
This is a bug in the v4l2 library, you can check the relevant details.
To fix this problem, simply modify the /home/larf/.virtualenvs/cv/local/lib/python3.7/site-packages/v4l2.py file:
197 line: “) = range (1, 9) + [0x80]” ==> “) = list (range (1, 9)) + [0x80]”
248 line: “) = range (0, 4) + [2]” ==> ") = list (range (0, 4)) + [2] "

Thanks for the helpful reply. This results in the following error:

 

/home/larf/.virtualenvs/cv/bin/python /home/hero/MIPI_Camera/RPI/python/video.py
Open camera…
Hardware Platform: c03111
init_camera: Unexpected result.

Hi,

What about the C code?