Arducam 12MP IMX477 causing error while running autofocus.py

I have integrated the camera with jetson nano 2gb, And i have launched focuserexample.py.
Where i can perform all actions from zoom, focus etc…,

But when i am trying to press enter for autofocus, after successful completion of autofocus the program getting crashed at the end. With the following error.

Then if i try to run the focuserexample.py again, i am getting this error.

Blockquote

python3 AutofocusExample.py
Error generated.
/dvs/git/dirty/git-master_linux/multinedia/nvgstreaner/gst-nvarguscamera/gstnvarguscamerasrc.cp,execute:751FatledtocreateCapturesession
[ WARN: 0] gLobal /hone/nvidia/host/butld_opencv/nv_opencv/nodules/videoto/src/cap_gstreamer.cpp(933)openOpencv|GStreamerwarning:Cannotqueryvideoposition:status-0,va
3
Exception in thread :
Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File " /hone/atum_x/MIPI_Camera/Jetson/JetsonNano_PTZ/JetsonCamera.py",line95,inrun
CV2. Imshow(selF. window_nane, self, camera-getFrame (2000))
ev2.error: OpenCu(4.1.1) /hone/nvidia/host/build_opencv/nv_opencv/modules/highgut/src/window.cpp:3523error: (-215:Assertion fatled) size.width»o 88 stze. hetght»0 in funetton 4
Focus value = 8070
STARTING …
FOCUS
End Point: 19620
Starting Point: 8070
init time = 5.499954
iLmage None
Traceback (most recent call last):
File “AutofocusExample-py”, line 47, in «module»
max_index,max value = auto focus.startFocus ()
File " /home /atun_x/MIPI_Camera/Jetson/JetsonNano_PTZ/AutoFocus.py",line 186, in startfocus
max_index,max_value = self. focusing(300,1,1)
File
“/hone /atun_x/MIPI_Canera/Jetson/JetsonNano_PTZ/AutoFocus.py”,line107,infocusing val - self.calculation(self canera)
File " /hone/atum_x/MIPI_Camera/Jetson/JetsonNano_PTZ/Autofocus.py",line87,incalculation
width = image. shape[11
AttributeError:
"NoneType’ object has no attribute ’ shape’
terminate called without an active exception

Blockquote

The sad part is I need to restart the system each time to run the autofocus now, so it’s really hard to find the cause. Someone please help me with this

@Akash

What is your camera sku number?