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

openPMD write: close file #188

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

ax3l
Copy link
Member

@ax3l ax3l commented Oct 12, 2023

Gives up the file handle and close the file after write.

Fix #187

Thank you for the report, @SchroederSa ! 👍

Gives up the file handle and close the file after write.
@ax3l ax3l added the bug Something isn't working label Oct 12, 2023
@ax3l ax3l requested a review from RemiLehe October 12, 2023 02:05
@ax3l
Copy link
Member Author

ax3l commented Oct 12, 2023

Update: we found the issue was actually from the (HDF5) reader occupying the file handle, while interactively trying to write to it again.

Nonetheless, the series.close() is clean to add and avoids that we need to wait for Python's garbage collector to destroy series and then close it.

@ax3l ax3l added cleaning Code cleaning and removed bug Something isn't working labels Oct 12, 2023
@RemiLehe RemiLehe enabled auto-merge (squash) October 12, 2023 13:53
@RemiLehe RemiLehe merged commit ec866a1 into LASY-org:development Oct 12, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleaning Code cleaning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

write_to_file does not close file
2 participants