You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Regression: click.launch() broken on Windows in version 8.1.8 #2868
click.launch("https://click.palletsprojects.com/en/stable/") results in [WinError 2] The system cannot find the file specified on Windows due to an incorrect migration from os.system to subprocess.call. Refer to the official documentation:
Could you revert that part of the code if there is no solution that avoids breaking an API that has worked for multiple years? The launch function is a high-level abstraction and should not expose the end developer to OS-related technical issues.
I'm not saying this isn't a bug, I'm saying we don't want to use shell=True. So the fix is not to revert it or use shell=True, but to research and fix it another way.
Activity
davidism commentedon Mar 10, 2025
We do not want to use
shell=True, so you'll need to find a different fix.ivankravets commentedon Mar 10, 2025
Sorry, but I’m not sure I understand you. The API has been working since the first version of Click (more than 10 years), and the documentation highlights the use of click.launch() in multiple places for opening web URLs. See: https://click.palletsprojects.com/en/stable/utils/#launching-applications
Could you revert that part of the code if there is no solution that avoids breaking an API that has worked for multiple years? The launch function is a high-level abstraction and should not expose the end developer to OS-related technical issues.
davidism commentedon Mar 10, 2025
I'm not saying this isn't a bug, I'm saying we don't want to use
shell=True. So the fix is not to revert it or useshell=True, but to research and fix it another way.johannkm commentedon Apr 1, 2025
I also ran in to this. Here's where this was introduced: #1477
I believe it would work to use the same error handling for windows as this diff adds for Linux: https://github.com/pallets/click/blob/stable/src/click/_termui_impl.py#L673-L679, with a fallback to webbrowser.open()
fix: add fallback for browser opening in explore command
rafalkrupinski commentedon Jul 21, 2025
#2986 mentions it's reasonable to drop support for an OS withing six months of its EOL.
The support for Windows 8 ended in 2023.
Should users be encouraged to use <8.1.8 if they want to support older Windows?
PlumLariat commentedon May 19, 2026
Ran on Windows 11 latest with 8.4.1, could not reproduce bug. I don't think it occurs any longer.
Rowlando13 commentedon May 19, 2026
@pyconus, I watched the above user try to reproduce, I also thing this no longer occurs.
kdeldycke commentedon May 22, 2026
This has been fixed in 8.4.0 by #3186
Add missing closing issue ref
Add missing closing issue ref