-
Notifications
You must be signed in to change notification settings - Fork 14
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
Saving fails when called from pythonw #188
Comments
This used to work and I've narrowed down when it stopped working to between vl-convert-python 1.1.0 and 1.2.0. vl-convert-python 1.1.0 works, 1.2.0 fails. |
Thanks for the report @tonyroberts. The differnece between 1.1.0 and 1.2.0 is almost certainly the update from deno 1.37.2 to 1.38.4. Deno is due for another update, so we can see if that makes a difference. I wonder if this is reproducible outside of windows (which would make it easier for me to debug). Are you in a situation where you have a requirement to use pythonw? |
Hi @jonmmease, Yes I think you're right about it being a difference in the Deno version. I don't have a non-Windows environment set up I can easily test this on right now... Actually the problem is not only using pythonw, that was just the easiest way to reproduce the issue. The actual problem for me is when calling this code from Python embedded in another Windows application (Excel) that doesn't have a console (so no stdin). I was just using the pre-built binaries from pypi, but I can try building from source with a newer Deno version and see if that helps. If you could please leave this open for now I will update you once I've had a chance to try that. Thanks! |
Thanks for the additional context, and it is helpful to know that pythonw reproduces the issue, as that's certainly easier for me to play with than embedding. Let me know what you find (or run into) when updating deno. Some past updates have't required any code changes in vl-convert, and others have required some rework, so I don't know how hairy this update will be. If the Deno update doesn't help, or if you run into issues with the update, another thing that would be helpful for me would be a PR that adds a new windows GitHub Action to https://github.com/vega/vl-convert/blob/main/.github/workflows/CI.yml that uses pythonw to reproduce the error. |
vl-convert 1.7.0 uses the latest version of Deno, so it's worth another try! |
I just tried with the latest version and got the same error, unfortunately :( I will look at writing a test and raise a PR. |
To reproduce issue vega#188
To reproduce issue vega#188
To reproduce issue vega#188
I've submitted PR #197 that shows the issue in the Windows test job. It fails with the same error as reported
|
Thanks, that's very helpful! |
Saving a chart from Python as png or svg fails when the process has no stdin. This can happen when Python is embedded in another application, or when running a script using pythonw instead of python.
OS: Windows
Python version: 3.11
Altair version: 5.4.1
vl-convert version: 1.6.1
To reproduce this issue run the following script using pythonw (not python) on Windows. The logging is necessary since pythonw won't log to stdout/stderr:
This fails with the following error:
The error is because of the worker thread failing with this error:
Possibly related to #181?
The text was updated successfully, but these errors were encountered: