microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
37 stars 27 forks source link

microscopeDevice: parsing of settings names does not exclude whitespaces #840

Closed carandraug closed 1 year ago

carandraug commented 1 year ago

This bug is hinted at in python-microscope/microscope#266

This configuration works:

[Green-Cam]
type: cockpit.devices.microscopeCamera.MicroscopeCamera
...
settings:
    aoi_height: 1024

but this one does not:

[Green-Cam]
type: cockpit.devices.microscopeCamera.MicroscopeCamera
...
settings:
    aoi_height = 1024

The problem is not the use of = instead of :, the problem is the space between the setting name and the =, i.e., using aoi_height : 1024 would fail as well because it would be trying to set a setting with the name aoi_height (note space character at the end) instead of aoi_height.

carandraug commented 1 year ago

This is now fixed with 0b57816db5902d . Closing as fixed.