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

Popup windows "Making stdin/stdout/stderr inheritable failed" when when running a gui-script on Windows #10706

Open
deffi opened this issue Jan 17, 2025 · 0 comments
Labels
windows Specific to the Windows platform

Comments

@deffi
Copy link

deffi commented Jan 17, 2025

Summary

When using uv run or uv tool run to run a script from [project.gui-scripts] in pyproject.toml, 3 popup messages are displayed before the script is started:

  • "Making stdin inheritable failed"
  • "Making stdout inheritable failed"
  • "Making stderr inheritable failed"

This is regardless of whether the script is doing anything GUI related or not.

To reproduce

Preparation:

  • uv init --app --package foo
  • In pyproject.toml, replace [project.scripts] with [project.gui-scripts]

Issue demonstration, in foo/:

  • uv run foo → popup messages
  • uv tool run --from . foo → popup messages

On the other hand, this works as expected:

  • .venv\Scripts\foo.exe → no popups
  • uv tool install . & foo → no popups

Output from uv --verbose run foo:

Output
DEBUG uv 0.5.20 (1c17662b3 2025-01-15)
DEBUG Found project root: `c:\Users\[...]\foo`
DEBUG No workspace root found, using project root
DEBUG Discovered project `foo` at: c:\Users\[...]\foo
DEBUG Reading Python requests from version file at `c:\Users\[...]\foo\.python-version`
DEBUG Using Python request `3.13` from version file at `.python-version`
DEBUG The virtual environment's Python version satisfies `3.13`
DEBUG Using request timeout of 30s
DEBUG Found static `pyproject.toml` for: foo @ file:///C:/Users/[...]/foo
DEBUG No workspace root found, using project root
DEBUG Existing `uv.lock` satisfies workspace requirements
Resolved 1 package in 10ms
DEBUG Using request timeout of 30s
DEBUG Requirement already installed: foo==0.1.0 (from file:///C:/Users/[...]/foo)
Audited 1 package in 0.49ms
DEBUG Using Python 3.13.1 interpreter at: C:\Users\[...]\foo\.venv\Scripts\python.exe
DEBUG Running `foo`
DEBUG Command exited with code: 0

Additional information

For scripts in [project.scripts] (as opposed to [project.gui-scripts]), this does not happen.

The message seems to be generated by the spawn_child function in uv-trampoline's bounce.rs.

Redirecting the output changes the behavior slightly:

  • uv run foo >1.txt → popups only for "stdin" and "stderr", output of foo in 1.txt
  • uv run foo 2>2.txt → no popups, messages written to 2.txt instead

Versions

Windows 11 Version 23H2 (Build 22631.4460)
uv 0.5.20 (1c17662 2025-01-15)

@deffi deffi changed the title Popups "Making stdin/stdout/stderr inheritable failed" when when running a gui-script on Windows Popup windows "Making stdin/stdout/stderr inheritable failed" when when running a gui-script on Windows Jan 17, 2025
@konstin konstin added the windows Specific to the Windows platform label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Specific to the Windows platform
Projects
None yet
Development

No branches or pull requests

2 participants