python-poetry / python-poetry/poetry
Poetry self uninstall failing on Windows
Open
Nobody has claimed this yet.
area/distribution
kind/bug
status/triage
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
Issue
When I run "poetry self uinstall" on windows I get the following error message:
Traceback (most recent call last):
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py", line 327, in run
exit_code = self._run(io)
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py", line 188, in _run self._load_plugins(io)
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py", line 355, in _load_plugins
manager.load_plugins()
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\plugins\plugin_manager.py", line 38, in load_plugins
self._load_plugin_entry_point(ep)
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\plugins\plugin_manager.py", line 76, in _load_plugin_entry_point
plugin = ep.load() # type: ignore[no-untyped-call]
File "C:\Users\tsara\.pyenv\pyenv-win\versions\3.10.5\lib\importlib\metadata\__init__.py", line 171, in load
module = import_module(match.group('module'))
File "C:\Users\tsara\.pyenv\pyenv-win\versions\3.10.5\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry_plugin_export\plugins.py", line 7, in <module>
from poetry_plugin_export.command import ExportCommand
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry_plugin_export\command.py", line 10, in <module>
from poetry_plugin_export.exporter import Exporter
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry_plugin_export\exporter.py", line 11, in <module>
from poetry.repositories.http_repository import HTTPRepository
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\repositories\http_repository.py", line 22, in <module>
from poetry.repositories.cached_repository import CachedRepository
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\repositories\cached_repository.py", line 11, in <module>
from poetry.config.config import Config
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\config\config.py", line 14, in <module>
from poetry.core.toml import TOMLFile
ModuleNotFoundError: No module named 'poetry.core.toml'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\tsara\.pyenv\pyenv-win\versions\3.10.5\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\tsara\.pyenv\pyenv-win\versions\3.10.5\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\Scripts\poetry.exe\__main__.py", line 7, in <module>
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py", line 406, in main exit_code: int = Application().run()
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\cleo\application.py", line 338, in run
self.render_error(e, io)
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py", line 180, in render_error
self.set_solution_provider_repository(self._get_solution_provider_repository())
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\console\application.py", line 395, in _get_solution_provider_repository
from poetry.mixology.solutions.providers.python_requirement_solution_provider import ( # noqa: E501
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\mixology\solutions\providers\__init__.py", line 3, in <module>
from poetry.mixology.solutions.providers.python_requirement_solution_provider import (
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\mixology\solutions\providers\python_requirement_solution_provider.py", line 9, in <module>
from poetry.puzzle.exceptions import SolverProblemError
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\puzzle\__init__.py", line 3, in <module>
from poetry.puzzle.solver import Solver
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\puzzle\solver.py", line 19, in <module>
from poetry.puzzle.provider import Indicator
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\puzzle\provider.py", line 25, in <module>
from poetry.inspection.info import PackageInfo
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\inspection\info.py", line 25, in <module>
from poetry.utils.env import EnvCommandError
File "C:\Users\tsara\AppData\Roaming\pypoetry\venv\lib\site-packages\poetry\utils\env.py", line 37, in <module>
from poetry.core.toml.file import TOMLFile
ModuleNotFoundError: No module named 'poetry.core.toml'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows self-uninstall failure and start with poetry/console/application.py and poetry/plugins/plugin_manager.py, following the traceback through the poetry_plugin_export imports. Check how the missing poetry.core.toml module affects command startup and error rendering; done means the self-uninstall command completes on Windows without this traceback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100