-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
Ensurepip fails ungracefully when mimetype is missing from Windows registry #100256
Labels
3.12
bugs and security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
easy
extension-modules
C modules in the Modules dir
OS-windows
topic-ensurepip
triaged
The issue has been accepted as valid by a triager.
type-bug
An unexpected behavior, bug, or error
Comments
Same thing happened with me ,Patrick and Stackoverflow. |
LucasEsposito
added a commit
to LucasEsposito/cpython
that referenced
this issue
Jul 19, 2024
…on if the accelerated one fails
LucasEsposito
added a commit
to LucasEsposito/cpython
that referenced
this issue
Jul 19, 2024
LucasEsposito
added a commit
to LucasEsposito/cpython
that referenced
this issue
Jul 19, 2024
…PI implementation
Opened a PR to address this issue |
LucasEsposito
added a commit
to LucasEsposito/cpython
that referenced
this issue
Jul 21, 2024
…etype_registry_keys
LucasEsposito
added a commit
to LucasEsposito/cpython
that referenced
this issue
Jul 21, 2024
…PI implementation
zooba
pushed a commit
that referenced
this issue
Aug 7, 2024
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 7, 2024
…pe implementation (pythonGH-122047) (cherry picked from commit 0bd9375) Co-authored-by: Lucas Esposito <LucasEsposito@users.noreply.github.com>
miss-islington
pushed a commit
to miss-islington/cpython
that referenced
this issue
Aug 7, 2024
…pe implementation (pythonGH-122047) (cherry picked from commit 0bd9375) Co-authored-by: Lucas Esposito <LucasEsposito@users.noreply.github.com>
blhsing
pushed a commit
to blhsing/cpython
that referenced
this issue
Aug 22, 2024
…pe implementation (pythonGH-122047)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.12
bugs and security fixes
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
easy
extension-modules
C modules in the Modules dir
OS-windows
topic-ensurepip
triaged
The issue has been accepted as valid by a triager.
type-bug
An unexpected behavior, bug, or error
Bug report
A "WinError 5 Access is denied" error occurs when ensurepip (for python 3.10 and above) is run and there are missing/inaccessible mimetypes in the Windows registry. Because ensurepip is used in the Python installer, it also fails silently there, causing pip to never be installed without alerting the user to the issue. The line in which the error occurs is here:
cpython/Lib/mimetypes.py
Line 250 in 024ac54
Bypassing that line and instead using
self._read_windows_registry(add_type)
(which is the fallback function I believe) fixes the problem. I believe that_mimetypes_read_windows_registry(add_type)
needs to be able to fail more gracefully when it can't find a particular mimetype in the registry.I found someone else describing exactly the issue here.
Your environment
Linked PRs
The text was updated successfully, but these errors were encountered: