[ x] I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
Steps to reproduce
pdm init
in a directory without a project
Actual behavior
Errors out with this message (truncated)
File "C:\GlobalScoopApps\pipx\venvs\pdm\Lib\site-packages\pdm\project\core.py", line 731, in _get_python_finder
finder = Finder(resolve_symlinks=True, selected_providers=providers or None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\GlobalScoopApps\pipx\venvs\pdm\Lib\site-packages\findpython\finder.py", line 32, in __init__
self._providers = self.setup_providers(selected_providers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\GlobalScoopApps\pipx\venvs\pdm\Lib\site-packages\findpython\finder.py", line 41, in setup_providers
allowed_providers = {name: ALL_PROVIDERS[name] for name in selected_providers}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\GlobalScoopApps\pipx\venvs\pdm\Lib\site-packages\findpython\finder.py", line 41, in <dictcomp>
allowed_providers = {name: ALL_PROVIDERS[name] for name in selected_providers}
~~~~~~~~~~~~~^^^^^^
KeyError: 'venv'
This is the contents of two variables just before it errors:
# Paste the output of `pdm info && pdm info --env` below:
❯ pdm info
[ProjectError]: The pyproject.toml has not been initialized yet. You can do this by running `pdm init`.
On a previous successful init:
❯ pdm info
PDM version:
2.13.3
Python Interpreter:
c:\Python\PYD_dev\.venv\Scripts\python.exe (3.11)
Project Root:
C:/Python/PYD_dev
Local Packages:
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
in a directory without a project
Actual behavior
Errors out with this message (truncated)
This is the contents of two variables just before it errors:
Expected behavior
pdm init has worked on this system.
Environment Information
On a previous successful init:
and
I tried reverting as far back as 2.13.0 to no avail.