Error Message: Execution of script builtin as a function is not supported:

조회 수: 9 (최근 30일)
Cg Gc
Cg Gc 2024년 10월 12일
댓글: Cg Gc 2024년 10월 17일
I have been running scripts with Matlab2009b and different ones for Matab2017 for the fast few years. Just recently, I have been getting these strange errors when I try to use the scripts.
Execution of script builtin as a function is not supported: [file location].
When I try to open a .m file I get this error message.
Invalid text character. Check for unsupported symbol, invisible character, or pasting of non-ASCII characters.
These are new error messages and it doesn't matter if I am on 2009, 2017 or 2023b. I am getting the same error messages. I can't even view variables anymore. Is there some incompatability thing going on?

답변 (1개)

Walter Roberson
Walter Roberson 2024년 10월 12일

This suggests that you have somehow added a builtin.m to your MATLAB path. You will need to track it down and remove it. If you are lucky then

which -all builtin

will show you the offending file.

You could experiment with using

restoredefaultpath; rehash toolboxecache

If that works then

savepath

You will likely need to do this for all versions of MATLAB.

But I suspect that you have builtin.m in your default MATLAB directory.

  댓글 수: 2
Cg Gc
Cg Gc 2024년 10월 17일
I found the builtin file. I've recycled it, but it seems like it has always been there. It was addedd back in 2002.
Here is what happened when I tried the code provided. This is for 2009b MATLAB.
>> which -all builtin
built-in (C:\Program Files\MATLAB\R2009b\toolbox\matlab\lang\builtin)
>> restoredefaultpath; rehash toolboxecache
??? Error using ==> rehash
No such rehash option.
%Recycled the offending bultin.m files.
% Tried adding folders to my path.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\assert.m has the same name as a MATLAB builtin.
We suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\assignin.m has the same name as a MATLAB builtin.
We suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\disp.m has the same name as a MATLAB builtin. We
suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\display.m has the same name as a MATLAB builtin.
We suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\end.m has the same name as a MATLAB builtin. We
suggest you rename the function to avoid a potential name conflict.
Warning: Function C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\compiler\mcr\matlab\lang\error.m has the same name as a MATLAB builtin. We
suggest you rename the function to avoid a potential name conflict.
...
%Replaced my name with ###. I got about two pages of those messages before
%ending on...
??? Attempt to execute SCRIPT builtin as a function:
C:\Users\###\Desktop\Matlab\MATLAB\R2009b\toolbox\matlab\lang\builtin.m
Cg Gc
Cg Gc 2024년 10월 17일
Whatever is happening makes it so that I can't close Matlab without using Task Manager.

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

카테고리

Help CenterFile Exchange에서 Search Path에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by