Unrecognized field name "help_location".

8 次查看(过去 30 天)
Hi all,
I have just updated my Matlab to 2022a release. However, when starting Matlab it makes errors as below. I appreciate let me know how can I remove the errors. Thanks.
---------------------------------------------------------------------------
Unrecognized field name "help_location".
Error in matlab.internal.doc.project.buildToolboxStruct>getSourceFileStruct (line 77)
xmlFileStruct.help_location = fixSlashes(xmlFileStruct.help_location);
Error in matlab.internal.doc.project.buildToolboxStruct>getSourceFileStructArray (line 55)
fileStruct = getSourceFileStruct(file);
Error in matlab.internal.doc.project.buildToolboxStruct (line 3)
docFileStructArray = getSourceFileStructArray(docFiles);
Error in matlab.internal.doc.project.getCustomToolboxes (line 12)
customToolboxes = matlab.internal.doc.project.buildToolboxStruct(docFiles,demoFiles);
Error in matlab.internal.doc.updateCustomDocContent (line 2)
matlab.internal.doc.project.getCustomToolboxes;
Unrecognized field name "help_location".
Error in matlab.internal.doc.project.buildToolboxStruct>getSourceFileStruct (line 77)
xmlFileStruct.help_location = fixSlashes(xmlFileStruct.help_location);
Error in matlab.internal.doc.project.buildToolboxStruct>getSourceFileStructArray (line 55)
fileStruct = getSourceFileStruct(file);
Error in matlab.internal.doc.project.buildToolboxStruct (line 3)
docFileStructArray = getSourceFileStructArray(docFiles);
Error in matlab.internal.doc.project.getCustomToolboxes (line 12)
customToolboxes = matlab.internal.doc.project.buildToolboxStruct(docFiles,demoFiles);
Error in matlab.internal.doc.search.configureSearchServer>findCustomToolboxes (line 40)
tbxs = matlab.internal.doc.project.getCustomToolboxes;
Error in matlab.internal.doc.search.configureSearchServer (line 12)
tbxs = findCustomToolboxes;
---------------------------------------------------------------------------------
  3 个评论
mbvoyager
mbvoyager 2022-4-1
编辑:mbvoyager 2022-4-1
I have the same issue and the hotfixes provided by Walter here didn't work. Actually with this error it is not possible to call the MATLAB doc or help.
A reinstallation does not solve the issue. However, I still have an old version installed. I will try to deinstall the old version and reinstall solely the new. Maybe that helps.

请先登录,再进行评论。

回答(1 个)

Tricia
Tricia 2022-4-1
This error can be caused by either an info.xml or demos.xml file on the MATLAB path that is missing an expected field.
An info.xml file could be missing the name or help_location fields.
A demos.xml file could be missing the name field.
The issue can be resolved by:
1) Finding the problematic file
2) Removing it from the MATLAB path or fixing it according to the documentation for authoring custom documentation or examples.
To find the problematic file, execute the commands shown below in MATLAB.
Find possible problematic info.xml file:
>> allFiles = string(which('info.xml','-all'));
>> notUnderMatlabRoot = ~startsWith(allFiles,matlabroot);
>> files = allFiles(notUnderMatlabRoot)
Find possible problematic demos.xml file:
>> allFiles = string(which('demos.xml','-all'));
>> notUnderMatlabRoot = ~startsWith(allFiles,matlabroot);
>> files = allFiles(notUnderMatlabRoot)
files will contain a list of files to inspect manually. Look for one that is missing the field from the "Unrecognized field name" error message.

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by