Python algorithm creation error

I am looking to alter slightly the SNSPowderReduction.py algorithm to accept more inputs (a grouping file to pass to AlignAndFocusPowder), but I am having trouble getting the algorithm creation to work. The python script containing the algorithm executes fine, but when I call the algorithm in another script I get the following error:

“Python argument types in DataProcessorAlgorithm.init(SNSPowderRED) did not match C++ signature: init(_object*)”

I assume this is an issue with how I’ve defined the algorithm, but what’s strange is that when I try repeating this same procedure but only modifying the name of the algorithm and nothing else, I get the same error. Does anyone know what might be causing this error?

I am running mantidpython (Mantid 3.7.2) from the terminal on a ThinLinc remote linux environment.

Hi,

Thanks for your message. Has the directory containing the modified script been added to the list of script directories (under File/Manage user directories)? Are you calling the algorithm directly in a script, within another algorithm or via createChildAlgorithm?

The SNSPowderReduction algorithm has recently been modified to do something similar to what you are looking for - it has an extra parameter to accept a grouping file. This has been merged in (see pull request here) and should be available in the nightly builds soon.

The new modification is what I needed. Thank you.