error using imwrite, permission failure

2 vues (au cours des 30 derniers jours)
TaylorB
TaylorB le 7 Sep 2022
Commenté : TaylorB le 14 Sep 2022
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 commentaires
Rik
Rik le 8 Sep 2022
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 le 14 Sep 2022
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Manage Products dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by