This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python interpreter crashes on bootup with multiple PythonPaths set in registry
Type: crash Stage: resolved
Components: Interpreter Core, Windows Versions: Python 3.11
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: steve.dower Nosy List: darktohka, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords: patch

Created on 2022-01-07 19:57 by darktohka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 30466 merged darktohka, 2022-01-07 20:19
Messages (3)
msg410019 - (view) Author: Derzsi Dániel (darktohka) * Date: 2022-01-07 19:57
When multiple PythonPaths are set up in the registry, in addition to the default PythonPath, the interpreter crashes immediately on bootup.

```Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\3.11\PythonPath\Panda3D]
@="C:\\Panda3D-1.11.0-x64\\python"```

The interpreter will crash with the following message:

```Exception ignored error evaluating path:
Traceback (most recent call last):
  File "<frozen getpath>", line 652, in <module>
TypeError: QueryValue expected 2 arguments, got 1
Fatal Python error: error evaluating path
Python runtime state: core initialized

Current thread 0x00002bd0 (most recent call first):
  <no Python frame>```

This regression was introduced in the Python 3.11 branch with commit 99fcf1505218464c489d419d4500f126b6d6dc28 on Dec 3, 2021.
msg410047 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-01-07 22:26
New changeset c9dc1f491e8edb0bc433cde73190a3015d226891 by Daniel in branch 'main':
bpo-46297: Fix interpreter crash on startup with multiple PythonPaths set in registry (GH-30466)
https://github.com/python/cpython/commit/c9dc1f491e8edb0bc433cde73190a3015d226891
msg410048 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2022-01-07 22:26
Thanks for the report and the PR!
History
Date User Action Args
2022-04-11 14:59:54adminsetgithub: 90455
2022-01-07 22:42:21steve.dowersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-01-07 22:26:28steve.dowersetassignee: steve.dower
messages: + msg410048
2022-01-07 22:26:09steve.dowersetmessages: + msg410047
2022-01-07 21:19:05eryksunsettype: behavior -> crash
2022-01-07 21:18:28eryksunsetnosy: + paul.moore, tim.golden, zach.ware
type: crash -> behavior
components: + Windows
2022-01-07 21:14:55ned.deilysetnosy: + steve.dower
2022-01-07 20:19:22darktohkasetkeywords: + patch
stage: patch review
pull_requests: + pull_request28669
2022-01-07 19:57:35darktohkacreate