Cannot load tube file/recognise IDF (SANS2D)

In an attempt to reduce some data from SANS2D on Mantid (on my PC), the IDF does not automatically load when the instrument is selected and when loading the mask file, it throws up the error below. All the files listed in the mask file are in one of the user directories.

"LoadEmptyInstrument started
LoadEmptyInstrument successful, Duration 1.38 seconds
Load started
Failed to read as ASCII this file: 'C:\Users\William\Documents\PhD\Masks\TUBE_SANS2D_BOTH_40673_15Nov16.nxs, error description: No valid data in file, check separator settings or number of columns per bin.
Error in execution of algorithm LoadAscii:
Failed to recognize this file as an ASCII file, cannot continue.
Error in execution of algorithm Load:
Failed to recognize this file as an ASCII file, cannot continue.
RuntimeError: Invalid input for tube calibration file (TUBE_SANS2D_BOTH_40673_15Nov16.nxs ).
Please do not run a reduction as it will not successfully complete.

at line 3 in ‘’
caused by line 3257 in ‘C:/MantidInstall/scripts/SANS\’
caused by line 3284 in ‘C:/MantidInstall/scripts/SANS\’
caused by line 4011 in ‘C:/MantidInstall/scripts/SANS\’"

Please could someone advise on who to get around this/if this error has been thrown up elsewhere and has a known solution.

Thanks in advance,


Hi Will

I’ve not come across this exact issue before but something odd is happening somewhere here. It looks like it is struggling to load the calibration file TUBE_SANS2D_BOTH_40673_15Nov16.nxs. For some reason it is trying to load this as an Ascii file rather than a nexus file. If you attempt to run the Load algorithm directly on the calibration file (TUBE_SANS2D_BOTH_40673_15Nov16.nxs) what happens ?

This can be done by typing Load into the algorithm search box typing load and then clicking execute. You can then navigate to the calibration file and click load.

Hi Matthew,

Same error - seems strange as this is the exact file taken from the computer on the beamline and didn’t have the same error there.

Hi Will

I’ve just tried with that file from the ISIS data server and it seems to be able to Load. Is it possible your local copy has become corrupted somehow.

Can you access a fresh copy of the file ?



I have accessed a fresh copy and it still throws up the same error. Cannot get the .nxs file with any of the Load algorithms in Mantid.



I’ve got it to work.

I can think of two possible causes but could be very wrong:

  1. User directory path lengths were too long
  2. Some path in the user directory was causing an error to be thrown up (think i had a C:/Mantid/… path in there along with the path for a folder containing the reduced data.

Thanks for your help with this Matt

Glad you got it working in the end.

I suspect you are right that something in the directory path was causing the issue. I assume it started working once you moved the files elsewhere?

Was the failing path C:\Users\William\Documents\PhD\Masks\TUBE_SANS2D_BOTH_40673_15Nov16.nxs?
Where did you move the files to to get it to work?

I had a number of paths with mask files in the directory. One of which was extremely long (which could have been the culprit). I moved all the searchable directories to a single folder on the desktop which seemed to crack it.