Skip to content

Pymca main window: avoid pop-up on broken link #1111

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

Open
woutdenolf opened this issue Apr 2, 2025 · 1 comment
Open

Pymca main window: avoid pop-up on broken link #1111

woutdenolf opened this issue Apr 2, 2025 · 1 comment

Comments

@woutdenolf
Copy link
Collaborator

import h5py

with h5py.File("test.h5", track_order=True, mode="w") as fh:
    i = 1
    entry = fh.create_group(f"1.{i}")
    entry["instrument/detector/data"] = [1, 2, 3]
    entry["measurement/data"] = h5py.SoftLink(f"/1.{i}/instrument/detector/data")

    i = 2
    entry = fh.create_group(f"1.{i}")
    entry["measurement/data"] = h5py.SoftLink(f"/1.{i}/instrument/detector/data")

A dialog pops up with

'NoneType' object has no attribute '_posixPath'   File "/home/denolf/dev/pymca/src/PyMca5/PyMcaGui/io/hdf5/HDF5Widget.py", line 562, in rowCount
    return len(self.getProxyFromIndex(index))
  File "/home/denolf/dev/pymca/src/PyMca5/PyMcaGui/io/hdf5/HDF5Widget.py", line 354, in __len__
    return len(self.children)
  File "/home/denolf/dev/pymca/src/PyMca5/PyMcaGui/io/hdf5/HDF5Widget.py", line 207, in children
    finalList[i][1]._posixPath = posixpath.join(self.name,
@vasole
Copy link
Member

vasole commented Apr 2, 2025

As far as a broken link icon is shown somewhere...

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