error using imwrite, permission failure

조회 수: 3 (최근 30일)
TaylorB
TaylorB 2022년 9월 7일
댓글: TaylorB 2022년 9월 14일
I received the following error in code that was previously running error-free and able to write images to a folder in Mac OS (Catalina 10.15.7). The Mac OS is fully up to date for my computer and I haven't installed any other recent Matlab updates (R2020a update 8) to cause this problem.:
"Error using imwrite (line 541)
Unable to open file "/Volumes/.../tiff-flats/" for writing. You might not have write permission."
The working code has previously written hundreds of image files to this folder before this error occurred. There's been no changes to the folder's path. The path is correct and I checked that the folder is in my path. I've checked that I have read/write permissions to the folder. Yet I still receive the same error message and can't write any images to the folder. What other things should I check that might cause this error to happen?
  댓글 수: 2
Rik
Rik 2022년 9월 8일
I vaguely recall that this sometimes happened to me when specifying specific image types or files without extension. That was on windows (and a while ago), so I'm not sure that helps you.
TaylorB
TaylorB 2022년 9월 14일
Thanks for the hint. The 'imwrite" code (line 541) also mentions 'sporadic' problems writing tiff files. The actual problem was in the image file name I used to define the variable, which included the raw file extension, and that prevented the file writing properly when the 'tiff' extension was added to the arguments in the imwrite command. The error message stating I 'might not have write permission' was a bit misleading.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by