Ticket #5478 (closed: fixed)

Opened 8 years ago

Last modified 5 years ago

Bug in python config[] with relative paths not transformed correctly (new API)

Reported by: Martyn Gigg Owned by: Martyn Gigg
Priority: major Milestone: Release 2.2
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Andrei Savici

Description

Using mantid.config[] with a relative path should always return the absolute path that has been constructed from the location of the properties file, this is not happening.

To reproduce ()

  • open up the Mantid.properties file;
  • change the instrumentDefintion.directory key to be a relative path to the instrument directory rather than the hard-coded absolute one;
  • open a terminal and set the PYTHONPATH variable to point to your bin directory (or bin/debug for windows)
  • change to any other directory than the one containing the 'Mantid.properties' file and start python
  • type:
    from mantid import config
    print config['instrumentDefinition.directory']
    

the path should be absolute but it is not at present.

Change History

comment:1 Changed 8 years ago by Martyn Gigg

Fix relative->absolute bug in [] op on ConfigService. Refs #5478

Changeset: b9fb908133b24112074aca8b8e69a449e85422ba

comment:2 Changed 8 years ago by Martyn Gigg

  • Status changed from new to accepted

comment:3 Changed 8 years ago by Martyn Gigg

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

comment:4 Changed 8 years ago by Martyn Gigg

Fix relative->absolute bug in [] op on ConfigService. Refs #5478

Changeset: b9fb908133b24112074aca8b8e69a449e85422ba

comment:5 Changed 8 years ago by Martyn Gigg

Fix relative->absolute bug in [] op on ConfigService. Refs #5478

Changeset: b9fb908133b24112074aca8b8e69a449e85422ba

comment:6 Changed 8 years ago by Andrei Savici

  • Status changed from verify to verifying
  • Tester set to Andrei Savici

comment:7 Changed 8 years ago by Andrei Savici

  • Status changed from verifying to closed

Works

comment:8 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 6324

Note: See TracTickets for help on using tickets.