Skip to content

"py uninstall --purge" crashes with INTERNAL ERROR #288

@Lusiiky

Description

@Lusiiky

Install source and version

  • Installed from the Windows Store
  • Installed with the MSIX from python.org
  • Installed with the MSI from python.org
  • Installed with winget install 9NQ7512CXL7T

Version: 26.0

Describe the bug
Running py uninstall --purge crashes with an internal error:

[ERROR] INTERNAL ERROR: TypeError: 'NoneType' object is not callable

The command starts normally and removes runtimes and cache directories, but fails during the final stage while purging shortcuts.

To Reproduce

  1. Install Python Install Manager (MSIX from python.org)
  2. Install at least one runtime with py install (tried with 3.10 and latest 3.14)
  3. Run:
    py uninstall --purge
    
  4. Confirm with Y or Enter
  5. Observe crash after "Purging all shortcuts"

Expected behavior
py uninstall --purge should complete successfully without throwing an internal exception.

Additional context

>> Writing logs to C:\Users\Lusiiky\AppData\Local\Temp\python_uninstall_20260322153836_7300.log
>> Python installation manager 26.0
Copyright (c) Python Software Foundation. All Rights Reserved.

BEGIN uninstall_command.execute: []
Reading installs from C:\Users\Lusiiky\AppData\Local\Python
Found 1 install
Calculating default install
Filtering installs by tag = 3
tag '3' matched 1 install
- 1 core install(s) by prefix
default_platform '-64' matched 1 install
Default install will be pythoncore-3.10-64
>  Purging Python 3.10.11 from C:\Users\Lusiiky\AppData\Local\Python\pythoncore-3.10-64
Atomically removing these files first: python.exe, python3.dll, python310.dll, pythonw.exe, vcruntime140.dll, vcruntime140_1.dll, __install__.json
Files successfully removed
>  Purging saved downloads from C:\Users\Lusiiky\AppData\Local\Python\_cache
Current PATH contains C:\Users\Lusiiky\AppData\Local\Microsoft\WindowsApps;D:\Users\Lusiiky\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\Lusiiky\AppData\Local\Muse Hub\lib;C:\Users\Lusiiky\.lmstudio\bin;C:\Users\Lusiiky\AppData\Local\JetBrains\Toolbox\scripts;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Users\Lusiiky\AppData\Local\Microsoft\WinGet\Packages\derrod.legendary_Microsoft.Winget.Source_8wekyb3d8bbwe;;C:\Users\Lusiiky\AppData\Local\Programs\ExifTool;C:\Users\Lusiiky\AppData\Roaming\npm;C:\Users\Lusiiky\AppData\Local\PowerToys\DSCModules\
>  Purging global commands from C:\Users\Lusiiky\AppData\Local\Python\bin
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip.exe.__script__.py
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.9.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.9.exe.__script__.py
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.9.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.exe.__script__.py
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pip3.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python3.10.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python3.10.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python3.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\python3.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw3.10.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw3.10.exe.__target__
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw3.exe
Purging C:\Users\Lusiiky\AppData\Local\Python\bin\pythonw3.exe.__target__
>  Purging all shortcuts
Cleaning up registry entries
Removing HKEY_CURRENT_USER\Software\Python\PythonCore\3.10
Cleaning up Start menu shortcuts
Removing C:\Users\Lusiiky\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python\Python 3.10\Python 3.10.lnk
Removing C:\Users\Lusiiky\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python\Python 3.10\Python 3.10 Online Documentation.lnk
Removing C:\Users\Lusiiky\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python\Python 3.10
Removing C:\Users\Lusiiky\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python
Removing ARP registration for pymanager-pythoncore-3.10-64
!! INTERNAL ERROR: TypeError: 'NoneType' object is not callable
TRACEBACK:
Traceback (most recent call last):
  File "manage\__init__.py", line 50, in main
  File "manage\commands.py", line 900, in execute
  File "manage\uninstall_command.py", line 109, in execute
TypeError: 'NoneType' object is not callable

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrelease-blockerDo not release without fixing this issue!

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions