-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: Ubuntu 18.10
- Poetry version: 1.0.5 (Python 3.7.3)
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/src-r-r/0e49d141226c53f32efd8eedddee05a6
Issue
This is a pretty straight-forward error. I have (essentially) a blank project. I'm just trying to add packages at this point. I'm within a virtual environment my-project which uses Python 3.7.
(my-project) user@host:~/projects/MyProject/my-project$ python -m poetry add git+https://github.com/django-nonrel/django.git -vvv
Using virtualenv: /home/user/.virtualenvs/my-project
[RuntimeError]
Unable to retrieve the package version for /tmp/pypoetry-git-djangop_wpk047
Traceback (most recent call last):
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/clikit/console_application.py", line 131, in run
status_code = command.handle(parsed_args, io)
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/clikit/api/command/command.py", line 120, in handle
status_code = self._do_handle(args, io)
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/clikit/api/command/command.py", line 171, in _do_handle
return getattr(handler, handler_method)(args, io, self)
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/cleo/commands/command.py", line 92, in wrap_handle
return self.handle()
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/poetry/console/commands/add.py", line 89, in handle
packages, allow_prereleases=self.option('allow-prereleases')
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/poetry/console/commands/init.py", line 293, in _determine_requirements
requires = self._parse_requirements(requires)
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/poetry/console/commands/init.py", line 381, in _parse_requirements
"git", url.url, reference=pair.get("rev")
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/poetry/puzzle/provider.py", line 204, in get_package_from_vcs
package = cls.get_package_from_directory(tmp_dir, name=name)
File "/home/user/.virtualenvs/my-project/lib/python3.7/site-packages/poetry/puzzle/provider.py", line 345, in get_package_from_directory
directory
As a reference, here's what happens when I do a PIP install (It's successful):
(my-project) user@host:~/projects/MyProject/my-project$ pip install git+https://github.com/django-nonrel/django.git
Collecting git+https://github.com/django-nonrel/django.git
Cloning https://github.com/django-nonrel/django.git to /tmp/pip-req-build-pbhc2wos
Running command git clone -q https://github.com/django-nonrel/django.git /tmp/pip-req-build-pbhc2wos
Building wheels for collected packages: Django
Building wheel for Django (setup.py) ... done
Created wheel for Django: filename=Django-1.6.11-py2.py3-none-any.whl size=6687483 sha256=db88f6db3fd029483634d63d8c76ef677738efa7b2847371ad0860f7a3cfbd4f
Stored in directory: /tmp/pip-ephem-wheel-cache-9q8m_c7h/wheels/a2/75/4e/fe05a7f75cbe771a6d30182e5feeebbca19482ec7b0effc741
Successfully built Django
Installing collected packages: Django
Successfully installed Django-1.6.11
frankier, sumanthratna, ribeirojose, fabiencelier and ggirelli
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected