issue with spaces in <locations> #10249
Labels
Framework
Issues and pull requests related to components in the Framework
High Priority
An issue or pull request that if not addressed is severe enough to postponse a release.
Milestone
This ticket is blocks : TRAC9427
Reported by Peter Willendrup
Loading the attached IDF gives the error
Error in execution of algorithm LoadInstrument:
bad lexical cast: source type value could not be interpreted as target
Error in execution of algorithm LoadEmptyInstrument:
bad lexical cast: source type value could not be interpreted as target
This IDF previously worked with release mantid-3.1.20140321.1714
Preliminary investigation indicate that this due to now parser can't handle spaces in
<locations>
attribute values.Fix this and also give more meaningful error message if attribute values of
<locations>
are not validIt was found by substituting
<component type="MonNDtype-0" name="nD_Mantid_0" idlist="MonNDtype-0-list">
<locations x=" 0.285491" y="-1.5" y-end="1.5" n-elements=" 300" z=" 48.019" rot="61.6534107436081" axis-x="0" axis-y="1" axis-z="0" />
</component>
<type name="MonNDtype-0">
<component type="pixel-0">
<locations r=" 3.99948" t=" -73.3674" t-end=" 73.3676" n-elements=" 100"/>
</component>
</type>
With
<component type="MonNDtype-0" name="nD_Mantid_0" idlist="MonNDtype-0-list">
<locations x="0.285491" y="-1.5" y-end="1.5" n-elements="300" z="48.019" rot="61.6534107436081" axis-x="0" axis-y="1" axis-z="0" />
</component>
<type name="MonNDtype-0">
<component type="pixel-0">
<locations r="3.99948" t="-73.3674" t-end="73.3676" n-elements="100"/>
</component>
</type>
and idf was found to load
The text was updated successfully, but these errors were encountered: