error using imwrite, permission failure

3 次查看(过去 30 天)
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