matlab.internal.lang.capability.Capability error when opening data in the workspace
30 views (last 30 days)
Show older comments
Chris Keylock
on 16 Sep 2022
Answered: Walter Roberson
on 17 Sep 2022
Recently, when I double-click on any vector or array in the workspace to open it to view (these are small; this is not a memory issue regarding the display of vectors or arrays), I obtain the following error:
"Error: File: C:\ProgramFiles\MATLAB\R2021b\toolbox\matlab\codetools\openvar.m Line: 97 Column: 12 Unable to find or import 'matlab.internal.lang.capability.Capability'. Imported names must end with '.*' or be fully qualified."
I am using 2021b on a Windows10 machine. I've never had this arise before. Does somebody know why this is happening?
2 Comments
Walter Roberson
on 16 Sep 2022
Experiment with
restoredefaultpath; rehash toolboxcache
and test. If it cures the problem then you had something on your MATLAB path that is interfering.
Accepted Answer
Walter Roberson
on 17 Sep 2022
If you have third-party toolboxes on your MATLAB path and they are earlier on the path than the built-in folders, then you can encounter random internal problems.
One third-party toolbox that often leads to this kind of problems is SPM12, which has a couple of "legacy" folders containing implementations of Mathworks functions for use in MATLAB releases before Mathworks introduced the functions. In most cases those "legacy" folders for SPM12 should be deleted.
The third party tool dfield also had a couple of problems along these lines.
The restoredefaultpath; rehash toolboxcache solution is not a permanent solution: it would remove all third-party tools from your path until the next time you restart MATLAB, unless you use savepath or pathtool . If you no longer use the third-party tools then remove them (at least from your path); if you still use them, then you could try moving the third-party tools to the end of the path ( pathtool is very useful for this purpose.) But sometimes you end up needing to go into the third-party tool and renaming some of its files and adjusting the code, as the third-party tools sometimes rely upon their incompatible functions.
0 Comments
More Answers (0)
See Also
Categories
Find more on Performance and Memory 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!