Ask Your Question

cv:imwrite Python error with Windows: can't open file for writing: permission denied

asked 2020-09-23 23:42:53 -0500


I am receiving an error message when I execute the code in Python with Windows10.

[ WARN:0] global C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-k8sx3e60\opencv\modules\imgcodecs\src\loadsave.cpp (710) cv::imwrite_ imwrite_('C:/Users/Default/Pictures/hall.jpg'): can't open file for writing: permission denied The directory initially had an special character "César": "C:\Users\César". But I also tried to save the picture in another location: "C:\Users\Default\Pictures" and the error message still continues.

Could somebody help ?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2020-09-24 05:12:14 -0500

mvuori gravatar image

That's because you lack permissions in that special template folder. You are running into Windows' features, not OpenCv's.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-09-23 23:42:53 -0500

Seen: 122 times

Last updated: Sep 24