You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ venv/bin/python3 -m poetry init
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 48, in <module>from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/cleo/application.py", line 327, in run
exit_code =self._run(io)
^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 188, in _runself._load_plugins(io)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 354, in _load_plugins
manager.load_plugins()
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/plugins/plugin_manager.py", line 38, in load_pluginsself._load_plugin_entry_point(ep)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/plugins/plugin_manager.py", line 76, in _load_plugin_entry_point
plugin = ep.load() # type:ignore[no-untyped-call]^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/plugins.py", line 7, in <module>from poetry_plugin_export.command import ExportCommand
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/command.py", line 12, in <module>from poetry_plugin_export.exporter import Exporter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/exporter.py", line 11, in <module>from poetry.repositories.http_repository import HTTPRepository
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/repositories/http_repository.py", line 26, in <module>from poetry.utils.authenticator import Authenticator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/utils/authenticator.py", line 22, in <module>from requests_toolbelt import user_agent
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/__init__.py", line 12, in <module>from .adapters import SSLAdapter, SourceAddressAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in <module>from .ssl import SSLAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in <module>from .._compat import poolmanager
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 50, in <module>from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 48, in <module>from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/__main__.py", line 9, in <module>
sys.exit(main())
^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 411, in main
exit_code: int= Application().run()
^^^^^^^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/cleo/application.py", line 338, in runself.render_error(e, io)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 180, in render_errorself.set_solution_provider_repository(self._get_solution_provider_repository())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 400, in _get_solution_provider_repositoryfrom poetry.mixology.solutions.providers.python_requirement_solution_provider import (
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/mixology/solutions/providers/__init__.py", line 3, in <module>from poetry.mixology.solutions.providers.python_requirement_solution_provider import (
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/mixology/solutions/providers/python_requirement_solution_provider.py", line 9, in <module>from poetry.puzzle.exceptions import SolverProblemError
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/__init__.py", line 3, in <module>from poetry.puzzle.solver import Solver
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/solver.py", line 16, in <module>from poetry.puzzle.provider import Indicator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/provider.py", line 27, in <module>from poetry.packages.direct_origin import DirectOrigin
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/packages/direct_origin.py", line 14, in <module>from poetry.vcs.git import Git
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/vcs/git/__init__.py", line 3, in <module>from poetry.vcs.git.backend import Git
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/vcs/git/backend.py", line 25, in <module>from poetry.utils.authenticator import get_default_authenticator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/utils/authenticator.py", line 22, in <module>from requests_toolbelt import user_agent
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/__init__.py", line 12, in <module>from .adapters import SSLAdapter, SourceAddressAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in <module>from .ssl import SSLAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in <module>from .._compat import poolmanager
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 50, in <module>from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
Same thing with other poetry commands.
The only difference in pip freeze is the requests-toolbelt version.
And again in debug mode
As requested by the issue template. Output looks the same because the exception happens immediately, but I didn't compare in detail.
Details
$ venv/bin/python3 -m poetry init -vvv
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 48, in <module>from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/cleo/application.py", line 327, in run
exit_code =self._run(io)
^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 188, in _runself._load_plugins(io)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 354, in _load_plugins
manager.load_plugins()
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/plugins/plugin_manager.py", line 38, in load_pluginsself._load_plugin_entry_point(ep)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/plugins/plugin_manager.py", line 76, in _load_plugin_entry_point
plugin = ep.load() # type:ignore[no-untyped-call]^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
module = import_module(match.group('module'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/importlib/__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/plugins.py", line 7, in <module>from poetry_plugin_export.command import ExportCommand
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/command.py", line 12, in <module>from poetry_plugin_export.exporter import Exporter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry_plugin_export/exporter.py", line 11, in <module>from poetry.repositories.http_repository import HTTPRepository
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/repositories/http_repository.py", line 26, in <module>from poetry.utils.authenticator import Authenticator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/utils/authenticator.py", line 22, in <module>from requests_toolbelt import user_agent
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/__init__.py", line 12, in <module>from .adapters import SSLAdapter, SourceAddressAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in <module>from .ssl import SSLAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in <module>from .._compat import poolmanager
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 50, in <module>from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 48, in <module>from requests.packages.urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'requests.packages.urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/__main__.py", line 9, in <module>
sys.exit(main())
^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 411, in main
exit_code: int= Application().run()
^^^^^^^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/cleo/application.py", line 338, in runself.render_error(e, io)
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 180, in render_errorself.set_solution_provider_repository(self._get_solution_provider_repository())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/console/application.py", line 400, in _get_solution_provider_repositoryfrom poetry.mixology.solutions.providers.python_requirement_solution_provider import (
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/mixology/solutions/providers/__init__.py", line 3, in <module>from poetry.mixology.solutions.providers.python_requirement_solution_provider import (
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/mixology/solutions/providers/python_requirement_solution_provider.py", line 9, in <module>from poetry.puzzle.exceptions import SolverProblemError
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/__init__.py", line 3, in <module>from poetry.puzzle.solver import Solver
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/solver.py", line 16, in <module>from poetry.puzzle.provider import Indicator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/puzzle/provider.py", line 27, in <module>from poetry.packages.direct_origin import DirectOrigin
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/packages/direct_origin.py", line 14, in <module>from poetry.vcs.git import Git
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/vcs/git/__init__.py", line 3, in <module>from poetry.vcs.git.backend import Git
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/vcs/git/backend.py", line 25, in <module>from poetry.utils.authenticator import get_default_authenticator
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/poetry/utils/authenticator.py", line 22, in <module>from requests_toolbelt import user_agent
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/__init__.py", line 12, in <module>from .adapters import SSLAdapter, SourceAddressAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/__init__.py", line 12, in <module>from .ssl import SSLAdapter
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/ssl.py", line 16, in <module>from .._compat import poolmanager
File "/private/tmp/poetry-test/venv/lib/python3.11/site-packages/requests_toolbelt/_compat.py", line 50, in <module>from urllib3.contrib import appengine as gaecontrib
ImportError: cannot import name 'appengine' from 'urllib3.contrib' (/private/tmp/poetry-test/venv/lib/python3.11/site-packages/urllib3/contrib/__init__.py)
The text was updated successfully, but these errors were encountered:
Oddly enough, I had to manually upgrade with pip3.11 install requests-toolbelt -U after installing Poetry. Just in case anyone else runs into the same problem.
-vvv
option) and have included the output below.Issue
If you already have requests-toolbelt < 1 installed, it's incompatible with urllib3 v2.
I suggest bumping the minimum requests-toolbelt version to v1.
Fresh install, with latest requests-toolbelt 1.0.0
Other poetry commands work fine.
With requests-toolbelt < 1 already installed
Same thing with other poetry commands.
The only difference in
pip freeze
is the requests-toolbelt version.And again in debug mode
As requested by the issue template. Output looks the same because the exception happens immediately, but I didn't compare in detail.
Details
The text was updated successfully, but these errors were encountered: