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

Trouble with reading h5 filename #356

Closed
RitaliG opened this issue Jan 16, 2025 · 2 comments · Fixed by #358
Closed

Trouble with reading h5 filename #356

RitaliG opened this issue Jan 16, 2025 · 2 comments · Fixed by #358
Labels
bug Something isn't working code: Pluto Specific to Pluto io: hdf5 Specific to xdmf/hdf5 files

Comments

@RitaliG
Copy link
Contributor

RitaliG commented Jan 16, 2025

Getting an error

File "h5py/h5o.pyx", line 190, in h5py.h5o.open
KeyError: 'Unable to open object (component not found)'" 

while trying to do a projection plot with the yt environment suddenly.

To verify the timestep, I gave a print statement for the variable entry after line 127 in lib/python3.10/site-packages/yt_idefix/io.py. It returns 2025, instead of the timestep I was trying to access. There is a 2025 in the file path (turb-sims-jan2025/test-wind/). Is there a workaround for this?

@dutta-alankar
Copy link
Contributor

Got it! This has been an edge case which was overlooked indeed. I guess we didn't expect the directory structure to contain any 4 digit number. Instead we must look for 4 digit number at the end.
I, therefore, propose the following regex in io.py line 112. See the PR.

@neutrinoceros
Copy link
Owner

Thanks @RitaliG for reporting and @dutta-alankar for proposing a solution so promptly !
I'm not confident I have enough details yet to understand what the problem is or what the solution should be, but let's discuss it over at #357.

@neutrinoceros neutrinoceros linked a pull request Jan 16, 2025 that will close this issue
@neutrinoceros neutrinoceros added bug Something isn't working code: Pluto Specific to Pluto io: hdf5 Specific to xdmf/hdf5 files labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code: Pluto Specific to Pluto io: hdf5 Specific to xdmf/hdf5 files
Projects
None yet
3 participants