Closed SilkeSchomann closed 11 months ago
I see: SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
This issue is the same as: https://stackoverflow.com/questions/37400974/error-unicode-error-unicodeescape-codec-cant-decode-bytes-in-position-2-3.
It's essentially due to the backslashes in the string causing \u
in \users
to be interpreted as the start of a Unicode code point . It can be fixed by doing:
import mslice.cli as mc
ws = mc.Load("C:\\Users\wym92549\Downloads\mslice data\MAR21335_Ei60meV.nxs")
or
import mslice.cli as mc
ws = mc.Load(r"C:\Users\wym92549\Downloads\mslice data\MAR21335_Ei60meV.nxs")
Hopefully this change won't effect too many legacy scripts. Our generate script functionality uses /
as the separator so is not effected.
EDIT: I've just seen another issue, and it appears it sometimes uses backslash in generated scripts.
The problem occurs in this line mc.PlotCut(wsq)
, not in Load.
TypeError: cannot unpack non-iterable NoneType object
File "
Describe the bug Error messages appear when using the command line interface of MSlice.
To Reproduce Run the example script from https://developer.mantidproject.org/Testing/DirectInelastic/MSliceTestGuide.html#the-command-line-interface