Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enlighten CSV loader is broken in 4.0.x #111

Closed
samiebee43 opened this issue Feb 23, 2023 · 2 comments
Closed

Enlighten CSV loader is broken in 4.0.x #111

samiebee43 opened this issue Feb 23, 2023 · 2 comments

Comments

@samiebee43
Copy link
Contributor

This error is independent of the CSV file itself. It looks like MeasurementFactory referencees a new field called 'view' but Measurement has not got the memo to include such a field

2023-02-23 16:55:50,270 [0x0000057c] enlighten.MeasurementFactory ERROR    create_from_file: error finalizing measurement
Traceback (most recent call last):
  File "C:\Users\sbee\Projects\ENLIGHTEN\enlighten\MeasurementFactory.py", line 276, in create_from_file
    self.create_thumbnail(m, is_collapsed)
  File "C:\Users\sbee\Projects\ENLIGHTEN\enlighten\MeasurementFactory.py", line 125, in create_thumbnail
    view            = measurement.view,
AttributeError: 'Measurement' object has no attribute 'view'
2023-02-23 16:55:50,270 [0x0000057c] enlighten.Plugins.PluginController DEBUG    received Measurement from event load
2023-02-23 16:55:50,270 [0x0000057c] enlighten.Measurements DEBUG    create_from_file: completing new measurement
2023-02-23 16:55:50,270 [0x0000057c] enlighten.Measurements ERROR    unable to add Measurement w/o ThumbnailWidget
@samiebee43 samiebee43 added the bug label Feb 23, 2023
@mzieg
Copy link
Member

mzieg commented Feb 24, 2023

Context: probably broke in 4.x when we renamed the old "Technique" menu to "View." "Technique" is still the correct name for the field in saved files, so that should be switched back in MeasurementFactory.

ENLIGHTEN <4.x had a single menu in which genuine spectroscopic techniques like Raman, Transmission/Reflectance, Absorbance etc were weirdly intermixed with GUI features more appropriately named "Views" like Scope and Hardware.

Separating those into two different comboBoxes in 4.x was the right decision; it looks like we went a little overboard with a batch rename in this case.

@samiebee43
Copy link
Contributor Author

fixed 526a30b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants