Importhdl error: unable to create the slx file, because the specified folder is read-only

1 次查看(过去 30 天)
Hello,
I am using Matlab R2022b on Windows 11 and I am having an issue with the `importhdl` command.
When I try to load hdl with `importhdl` I get the following error:
Unable to create the slx file, because the specified folder '...' is read-only.
This is very weird because I can manually create and save an slx file in the same folder without any issue.
When investigating on the rights of my user for the folder in question, I can see that I have them all (read/write/etc.).
I can only see that there is a `-` sign in the checkbox next to the `Read-only` attribute (i.e. only applies to files in folder). I tried to remove the sign, but it keeps coming back. It seems that I cannot remove it permanently.
Also, launching Matlab as Administrator does not help. The same issue produces.
Do you have an idea of the issue and how to fix it? Why can I create and delete files/subfolders from Matlab in a certain folder with mkdir and other commands, but the importhdl command cannot create a file in the same folder?
Thanks in avdance for your help!
  1 个评论
Enrica
Enrica 2023-2-13
Some more debugging:
  • the example importhdl('comparator.v'); runs properly and creates a Simulink file, even when run form the folder above, which means that the folder is NOT read-only
  • the error is thrown by importhdl (line 78). The code at that line is privimporthdl(hdlInSrc, varargin{:}), which cannot be debugged
I suspect that the true error is not a read-only issue but that the .v files I am trying to import are incompatible/corrupted.

请先登录,再进行评论。

回答(1 个)

Raghav
Raghav 2023-4-4
编辑:Raghav 2023-4-4
Hi,
Based on your question, I can understand that you are facing issue with ‘privimporthdl(hdlInSrc, varargin{:})’ line.
Please refer to the below mentioned link to know about the list of supported constructs with importhdl:
If you encounter the same error, please contact MathWorks Technical Support with your source code so we can investigate.
Thanks,
Raghav Bansal

类别

Help CenterFile Exchange 中查找有关 Application Deployment 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by