Saving configuration
The behaviour of saving a configuration file is not the same when saving from bliss shell and from a controller. The plugin is bliss.
Bliss shell is OK
ab = config.static.get_config().get_config("beamstop")
ab.filename
Out [2]: 'eh/multiple_positions.yml'
ab.save()
In a file:
class MultiplePositions:
def __init__(self, name, config):
print(config)
filename:<eh/__init__.yml>,plugin:'bliss',{'class': 'MultiplePositions', 'name': 'beamstop', 'positions': [filename:<eh/multiple_positions.yml>,plugin:'bliss',{'label': 'IN', 'description': 'Beamstop position IN beam', 'axes': [filename:<eh/multiple_positions.yml>,plugin:'bliss',{'axis': <bliss.common.axis.Axis object at 0x7feb0d27c828>, 'target': 2.5, 'delta': 0.01}, filename:<eh/multiple_positions.yml>,plugin:'bliss',{'axis': <bliss.common.axis.Axis object at 0x7feb0f3db438>, 'target': 1.0, 'delta': 0.2}]}, filename:<eh/multiple_positions.yml>,plugin:'bliss',{'label': 'OUT', 'description': 'Beamstop position OFF beam', 'axes': [filename:<eh/multiple_positions.yml>,plugin:'bliss',{'axis': <bliss.common.axis.Axis object at 0x7feb0d27c828>, 'target': 3.5, 'delta': 0.01}, filename:<eh/multiple_positions.yml>,plugin:'bliss',{'axis': <bliss.common.axis.Axis object at 0x7feb0f3db438>, 'target': 2.0, 'delta': 0.2}]}]}
The filename is wrong - should be eh/multiple_positions.yml. The problem comes from the bliss/config/static.py - the deep_copy method. It changes the file name from the one of the object to the one of the parent.