Ticket #3841 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Reduction UI: avoid silent crash when user have reduction.py on their python path

Reported by: Mathieu Doucet Owned by: Mathieu Doucet
Priority: major Milestone: Release 2.0
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Peter Parker

Description

Because of the way python modules are put on the PYTHONPATH, Mantid can be crashed if a user creates a python script using the name of a mantid python module. For instance, a user disabled the SANS reduction by saving a script named reduction.py in her main directory.

The reduction applications should catch such events and warn users.

NOTE: the long run solution for this is to create a proper Mantid python module for the framework scripts.

Change History

comment:1 Changed 9 years ago by Mathieu Doucet

  • Status changed from new to verify
  • Resolution set to fixed

In [14865]:

Fixes #3841

comment:2 Changed 9 years ago by Peter Parker

  • Status changed from verify to verifying
  • Tester set to Peter Parker

comment:3 Changed 9 years ago by Peter Parker

  • Status changed from verifying to closed

Message appended to results log upon adding an empty reduction.py file in main directory:

Error: Importing module "OSIRISDiffractionReduction" failed". cannot import name Reducer

comment:4 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 4688

Note: See TracTickets for help on using tickets.