Ticket #6831 (closed: fixed)
IndirectEnergyConversion createMapping and default output directory
Reported by: | Gesner Passos | Owned by: | Samuel Jackson |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.0 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Jay Rainey |
Description (last modified by Samuel Jackson) (diff)
When testing #6826 I found that the script fails if your outputdirectory does not contains a final slash. Mine was set to /tmp
The exception was:
IOError: [Errno 13] Permission denied: '/tmpgrouping.dat' at line 16 in '' caused by line 40 in 'Code/Mantid/scripts/Inelastic/IndirectEnergyConversion.py'
If you change the default save directory (properties) to /tmp/, than it does not fail.
Change History
comment:2 Changed 7 years ago by Martyn Gigg
- Milestone changed from Release 2.6 to Release 2.7
Batch move to 2.7
comment:5 Changed 7 years ago by Samuel Jackson
- Owner changed from Martyn Gigg to Samuel Jackson
- Description modified (diff)
comment:6 Changed 7 years ago by Samuel Jackson
- Component changed from Framework to Indirect Inelastic
comment:7 Changed 7 years ago by Samuel Jackson
- Status changed from new to inprogress
Refs #6831 concatenated path using os.path.join instead.
Changeset: 04421692f116a53dd7fda27635aef3d2079eb70e
comment:8 Changed 7 years ago by Samuel Jackson
To Tester
I used the following script from #6926 to verify I could reproduce the error after setting my default save directory to temp.
import mantid mantid.config["default.facility"]="ISIS" filename="IRS21360.nxs" import inelastic_indirect_reducer as iir reducer = iir.IndirectReducer() reducer.set_instrument_name("IRIS") reducer.set_detector_range(2,52) reducer.set_parameter_file("IRIS_graphite_002_Parameters.xml") reducer.append_data_file(filename) import IndirectEnergyConversion as ind group_file = "grouping.dat" mapfile = ind.createMappingFile(group_file, ngroup=10, nspec=((53-3+1)/10), first=3) reducer.set_grouping_policy(mapfile) reducer.reduce()
Check that you can reproduce the error without the fix. Then run the script again with the fix and check that the bug is gone.
comment:9 Changed 7 years ago by Samuel Jackson
- Status changed from inprogress to verify
- Resolution set to fixed
comment:11 Changed 7 years ago by Jay Rainey
- Status changed from verify to verifying
- Tester set to Jay Rainey
comment:12 Changed 7 years ago by Jay Rainey
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/bugfix/6831_Indirect_C2E_createMapping_bug'
comment:13 Changed 7 years ago by Jay Rainey
The error no longer occurs if output directory does not have a trailing backslash.
comment:14 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 7677
Moved to r2.6 at the end of r2.5