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

[Decoration] Exporting of rendered plots fails on windows #369

Closed
rihi opened this issue Nov 29, 2023 · 2 comments · Fixed by #370
Closed

[Decoration] Exporting of rendered plots fails on windows #369

rihi opened this issue Nov 29, 2023 · 2 comments · Fixed by #370
Assignees
Labels
bug Something isn't working priority-low Low priority issue

Comments

@rihi
Copy link
Collaborator

rihi commented Nov 29, 2023

Using DecoratedGraph.export_plot fails on windows. This is due to the method first creating a temporary file, writing contents to it and then calling dot with the filename as input while still holding the file handle. Windows doesn't allow another process to to open the file while we still have the handle, but we also can't simply drop it before calling dot, because that would remove it.

@rihi rihi added bug Something isn't working priority-low Low priority issue labels Nov 29, 2023
@rihi rihi self-assigned this Nov 29, 2023
@rihi
Copy link
Collaborator Author

rihi commented Nov 29, 2023

/cib

Copy link
Contributor

github-actions bot pushed a commit that referenced this issue Nov 29, 2023
blattm added a commit that referenced this issue Dec 7, 2023
* Create draft PR for #369

* Fix export_plot on windows

* black

* Move temporary file creation out of method

* Add missed flush

* add tests for png export

* add graphviz to dockerfile requirements

* Use CloseableNamedTemporaryFile.py

* Remove unnecessary use of temporary file

* Add missing file deletion for 'closeable_temporary_file'

* Rename CloseableNamedTemporaryFile.py

* test CloseableNamedTemporaryFile

* close CloseableNamedTemporaryFile before removing

* black

---------

Co-authored-by: rihi <[email protected]>
Co-authored-by: rihi <[email protected]>
Co-authored-by: Manuel Blatt <[email protected]>
Co-authored-by: Manuel Blatt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-low Low priority issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant