Skip to content

[fix] : Windows open cam handle #70

Open
CourageTrain wants to merge 5 commits intoNativeSensors:mainfrom
CourageTrain:windows_open_cam_handle_fix
Open

[fix] : Windows open cam handle #70
CourageTrain wants to merge 5 commits intoNativeSensors:mainfrom
CourageTrain:windows_open_cam_handle_fix

Conversation

@CourageTrain
Copy link
Copy Markdown

@CourageTrain CourageTrain commented Feb 15, 2026

All I did is the following -

try:
   # while running: ->pygame 
catch Exception as e:
   # print("Exception : {details}")
finally:
   pygame.quit()
   cap.close()   # necessary to avoid the open cam handle issue
   cv2.destroyAllWindows() # destroys openCV windows
   sys.exit() # closes current run on cmdline

@CourageTrain CourageTrain changed the title Windows open cam handle fix [fix] : Windows open cam handle Feb 16, 2026
@PeterWaIIace
Copy link
Copy Markdown
Collaborator

Hey,

I think it is not really beneficial to cover entire example code with try catches. It makes examples look more complicated and may hide other problem.

Issue with the open cam handle, it should be dealt inside library not outside of it.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants