title: Getting Qt: Session management error: Could not open network socket when running python script
body: <p>I am building an application that needs to read video data from a network camera using rtsp link.Its a automatic licence plate recognition project.here is thepython script that read video data:</p>
  <pre><code>import cv2
  
  cap = cv2.VideoCapture('rtsp://admin:admin@2022@115.127.67.229:554/trackID=1')
  
  while(cap.isOpened()):
      ret, frame = cap.read()
      cv2.imshow('camera view', frame)
      if cv2.waitKey(20) &amp; 0xFF == ord('q'):
          cv2.namedWindow(&quot;test&quot;)
          image_counter = 0
          while True:
              image, image_frame = cap.read()
              if not image:
                  print('failed to capture image')
                  break
              cv2.imshow('test capture', image_frame)
              k = cv2.waitKey(1)
              if k%256 == 27:
          # ESC pressed
                  print(&quot;Escape hit, closing...&quot;)
                  break
              elif k % 256 == 32:
                  image_name = &quot;opencv_frame_{}.png&quot;.format(image_counter)
                  cv2.imwrite(image_name, image_frame)
                  print(&quot;{} written!&quot;.format(image_name))
                  image_counter += 1
  cap.release()
  cv2.destroyAllWindows()
  </code></pre>
  <p>camera is running and playing the video. but for getting the Qt management error cant do still capture. What should I do?</p>