Live script code block refuses to execute.
2 views (last 30 days)
Show older comments
Lately, I have been having problems running my code from a live script. After running a code block, editing it, and then trying to re-run it, MATLAB will refuse to run it again. When I try, the blue wheel pops up for a second and then disappears. The code block also stays in the striped "not evaluated" texture on the side rather than the solid blue color. No coding related errors are thrown when this happens. The work-around has been to run
fclose('all');
from the command line. Likewise, spam pasting fclose('all'); through the live script seems to ensure that the code block can be run repeatedly.
In addition, after failing to re-run the code block, MATLAB enters a state where it won’t let me save the file and gives the error when I try to save.

Running fclose('all'); fixes this as well.
In my code, I am not deliberately opening any files, however, it is possible that some of the functions in the library that I am using are...
Other possible symptoms of the problem: sometimes, MATLAB will give me errors similar to the following.
Unable to load signatures for 'disp'. Failed to parse JSON file 'C:\Program Files\MATLAB\R2018b\toolbox\stats\stats\functionSignatures.json': <unspecified file>(1): expected value
Sometimes, 'disp' will be 'plot' or some other function that I am using.
One time, I got an error saying that to many files were open, and this led me to the "solution" that I mentioned earlier.
Unfortunately, I have not found a way to reliably recreate this glitch.
Thank you in advance for any words of advice!
0 Comments
Answers (0)
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!