cv2.imshow(wName, rectI.image) # draw image once
while True:
# display the image
# cv2.imshow(wName, rectI.image) <-- move to outside of the loop
key = cv2.waitKey(1) & 0xFF
# if returnflag is True or 'q' is hit, break from the loop
if rectI.returnflag or key == ord('q'):
break
It seems the waitkey() in clearCanvasNDraw() of the selectinwindow.py causes the recursive stack.
My temporary solution is to comment it out:
selectinwindow.py:
script.py: