diagrams
diagrams copied to clipboard
`poetry add diagrams` fails with an AssertionError
poetry add diagrams
is failing with an AssertionError
. pip install diagrams
works as expected (as does poetry run pip install diagrams
).
Python 3.8, installed via pyenv, on macOS 10.15.4, with Poetry 1.0.5.
The full error:
❯ poetry add diagrams -v
Using virtualenv: /Users/jacob/Library/Caches/pypoetry/virtualenvs/diagrams-4vZBj-48-py3.8
Using version ^0.10.0 for diagrams
Updating dependencies
Resolving dependencies... (0.0s)
[AssertionError]
Traceback (most recent call last):
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/console/commands/add.py", line 149, in handle
status = installer.run()
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/installation/installer.py", line 74, in run
self._do_install(local_repo)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/installation/installer.py", line 161, in _do_install
ops = solver.solve(use_latest=self._whitelist)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/puzzle/solver.py", line 36, in solve
packages, depths = self._solve(use_latest=use_latest)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/puzzle/solver.py", line 180, in _solve
result = resolve_version(
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/mixology/__init__.py", line 7, in resolve_version
return solver.solve()
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/mixology/version_solver.py", line 80, in solve
next = self._choose_package_version()
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/mixology/version_solver.py", line 382, in _choose_package_version
self._add_incompatibility(incompatibility)
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/mixology/version_solver.py", line 421, in _add_incompatibility
self._log("fact: {}".format(incompatibility))
File "/Users/jacob/.local/pipx/venvs/poetry/lib/python3.8/site-packages/poetry/mixology/incompatibility.py", line 111, in __str__
assert len(self._terms) == 2
I reproduced the same error with a slightly different error message. I'll check this issue. Thank you for reporting it.
I'm experiencing this as well. I thought at first it might be because my Python version is too new (3.9.5) but haven't arrived at a cause yet.
It appears to install fine via pipenv
on Python 3.9.6 so I don't think Python 3.9 is the issue. Hmm.
Works fine with Poetry version 1.1.7
Same problem with poetry 1.1.10 and python 3.8.5, installed via pyenv
worked for me with python 3.10 and poetry 1.1.11, I was getting the assertion error as my project was named diagrams
the same name as the dependency I was trying to add. Renaming the project to something else fixed the problem for me
Same here, which is obvious in retrospect but it might help to have a more helpful error message
@jacobian Can this be closed?