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

Most Current Prerelease No Longer Reading CHESS Dexela HDF 5 Files #1657

Open
darrencpagan opened this issue Feb 6, 2024 · 4 comments
Open
Assignees

Comments

@darrencpagan
Copy link

We recently updated to the most recent pre-release and the gui no longer reads in CHESS hdf5 files through the simple image series menu

Traceback (most recent call last):
  File "/nfs/chess/user/dcp99/sw/miniconda/envs/20240126_hexrdgui/lib/python3.11/site-packages/hexrdgui/simple_image_series_dialog.py", line 238, in select_images
    self.load_image_data(selected_files)
  File "/nfs/chess/user/dcp99/sw/miniconda/envs/20240126_hexrdgui/lib/python3.11/site-packages/hexrdgui/simple_image_series_dialog.py", line 288, in load_image_data
    if ImageFileManager().path_prompt(selected_files[0]) is None:
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nfs/chess/user/dcp99/sw/miniconda/envs/20240126_hexrdgui/lib/python3.11/site-packages/hexrdgui/image_file_manager.py", line 178, in path_prompt
    group, data, remember = path_dialog.results()
                            ^^^^^^^^^^^^^^^^^^^^^
  File "/nfs/chess/user/dcp99/sw/miniconda/envs/20240126_hexrdgui/lib/python3.11/site-packages/hexrdgui/load_hdf5_dialog.py", line 62, in results
    path_list = self.ui.hdf5_paths.currentItem().text()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'text'
@psavery
Copy link
Collaborator

psavery commented Feb 6, 2024

@bnmajor will be looking into this soon.

@bnmajor
Copy link
Collaborator

bnmajor commented Feb 26, 2024

@darrencpagan I have not been able to reproduce this so far but looking at the error though it looks like no path was selected for the hdf5 file. This is odd because that should not be possible. If you are able to share the image data that you are seeing this with though that may help me see what's going wrong.

@psavery
Copy link
Collaborator

psavery commented Feb 27, 2024

@bnmajor I wonder if an empty list in QSettings here is getting converted to None when we load it in (we are guarding against something similar here and here). We might have to guard against this as well.

It would be nice if Qt did not convert empty lists in the settings into None. I wonder if there's a way for us to fix that...

@psavery
Copy link
Collaborator

psavery commented Feb 27, 2024

To follow up on my last comment, it looks like it is specifically an issue with Qt and ini files (which are default only on Linux). It stores both empty lists and None as @Invalid, so both are interpreted as None when reading from the file. We would have to add some special logic to fix this for all possible empty lists.

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

3 participants