MATLAB:fullfile, Error in fullfile>locHandleError

The code was working a day before with no problem but today the following error appears
Error using message/getString
Unable to find message key 'UnknownError' in catalog 'MATLAB:fullfile'.
Error in fullfile>locHandleError (line 141)
excToThrow = MException(msgToThrow.Identifier, msgToThrow.getString);
Error in fullfile (line 93)
locHandleError(exc, varargin);
Error in toolboxdir (line 37)
s = fullfile(tbxprefix, tbxdirname);
Error in matlab.ui.internal.dialog.DialogUtils.imreadDefaultIcon (line 38)
iconFileName = fullfile(toolboxdir('matlab'), 'uitools', 'private', ['icon_' iconName '_32.png']);
Error in msgbox>setupStandardIcon (line 446)
[iconData, alphaData] = matlab.ui.internal.dialog.DialogUtils.imreadDefaultIcon(iconName);
Error in msgbox (line 361)
Img = setupStandardIcon(IconAxes, IconString);
Error in errordlg (line 59)
handle = msgbox(ErrorStringCell,dlgName,'error',replace);
Error in uiopen (line 202)
errordlg(err);

回答 (2 件)

Maryam Hasannasab
Maryam Hasannasab 2018 年 8 月 13 日

1 投票

Hi Walter, thanks for your patience. I found out where the problem was! Through a power cut or something, I had managed to save 'fullfile.m' into the current folder without I even notice. So MATLAB confused its own fullfile with the one I had saved in the folder. I removed the file so there is no problem any more.
Walter Roberson
Walter Roberson 2018 年 8 月 11 日

0 投票

When you see something about being unable to find the message key, then one of two things has happened:
  1. corrupted MATLAB installation; or
  2. you have too many files open already and MATLAB is not able to open a file it would use to create the correct error message.
In practice the second of those is much more likely. Try
fopen('all')
to see the list of open files.

5 件のコメント

Maryam Hasannasab
Maryam Hasannasab 2018 年 8 月 11 日
Thank you, Walter for your prompt answer. I tried fopen('all') and I got '[]'. So I uninstalled MATLAB, restarted my PC, installed it again and restarted my PC. Now I can open the files but I receive same errors. Worth to mention that I can even run the codes and get the results but I still have the red lines error with each try.
Walter Roberson
Walter Roberson 2018 年 8 月 11 日
What do you see if you
ls(fullfile(toolboxdir('matlab'), 'uitools', 'private', 'icon_error_32.png'))
Maryam Hasannasab
Maryam Hasannasab 2018 年 8 月 12 日
This is what I get:
Error using message/getString Unable to find message key 'UnknownError' in catalog 'MATLAB:fullfile'.
Error in fullfile>locHandleError (line 141) excToThrow = MException(msgToThrow.Identifier, msgToThrow.getString);
Error in fullfile (line 93) locHandleError(exc, varargin);
Walter Roberson
Walter Roberson 2018 年 8 月 12 日
Does that happen even if the ls() is the first thing you do after restarting MATLAB ?
Maryam Hasannasab
Maryam Hasannasab 2018 年 8 月 12 日
No, it doesn't.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

質問済み:

2018 年 8 月 11 日

回答済み:

2018 年 8 月 13 日

Community Treasure Hunt

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

Start Hunting!

Translated by