error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_ while recording with usb camera on TX2

Hello devs,
I’m trying to record full hd video from two usb cameras simultaneously on TX2.
But one of them is showing following error :

ret0, frame0 = video_capture_0.read()
cv2.error: /build/opencv-XDqSFW/opencv-3.2.0+dfsg/modules/imgcodecs/src/loadsave.cpp:637: error: (-215) !buf.empty() && buf.isContinuous() in function imdecode_

I’m using opencv’s cv2.VideoCapture() function in python to record the video.
This is happening only in case of one camera out of two. Other is working fine.
I tried googling the error but no any relevant post or solution found.

Hi,
For video capture through v4l2 source. You can refer to
https://devtalk.nvidia.com/default/topic/1065637/jetson-agx-xavier/sony-camera-module-cannot-be-opened-with-opencv-on-xavier/post/5397032/#5397032
R32.3.1 is with OpenCV4.1.1 and no need to run install_opencv4.1.1_Jetson.sh