Poetry should use the filename from content-disposition when downloading URL dependencies
- [x] I am on the latest Poetry version.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvvoption).
- OS version and name: VERSION="16.04.6 LTS (Xenial Xerus)
- Poetry version: Poetry version 1.1.8
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/sidsvash26/7f2df4ecfc1950de1195853c50cc5552
Issue
I'm trying to install a GitHub package by adding it manually in the pyproject.toml (please see the gist link above) file. I have only one entry in the package list.
When I run poetry install with the above pyproject.toml file., I get the following error:
error.log
Creating virtualenv package1-gxOcaWMk-py3.8 in /home/sidvash/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (10.8s)
Writing lock file
Package operations: 40 installs, 0 updates, 0 removals
• Installing certifi (2021.5.30)
• Installing chardet (3.0.4)
• Installing idna (2.8)
• Installing six (1.16.0)
• Installing urllib3 (1.25.11)
• Installing boto (2.49.0)
• Installing bottle (0.12.19)
• Installing click (8.0.1)
• Installing humanfriendly (9.2)
• Installing joblib (1.0.1)
• Installing networkx (2.6.2)
• Installing pycountry (20.7.3)
• Installing redis (3.5.3)
• Installing regex (2021.8.28)
• Installing requests (2.22.0)
• Installing thrift (0.11.0)
• Installing tqdm (4.62.2)
• Installing concrete (4.15.1)
• Installing future (0.18.2)
• Installing isodate (0.6.0)
• Installing jpype1 (1.3.0)
• Installing nltk (3.6.2)
• Installing pyparsing (2.2.0)
• Installing pystanforddependencies (0.3.1)
• Installing tabulate (0.8.9)
• Installing termcolor (1.1.0)
• Installing attrs (21.2.0)
• Installing memoized-property (1.0.3): Installing...
• Installing more-itertools (8.9.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0): Installing...
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing more-itertools (8.9.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0): Installing...
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing memoized-property (1.0.3)
• Installing more-itertools (8.9.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0): Installing...
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing overrides (3.1.0)
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing overrides (3.1.0)
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
• Installing numpy (1.21.1)
• Installing overrides (3.1.0)
• Installing packaging (21.0)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/pip', 'install', '--no-deps', '/home/sidvash/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 330, in _parse_req_string
req = Requirement(req_as_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 104, in __init__
raise InvalidRequirement(
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'/home/si'": Expected W:(abcd...)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 173, in _main
status = self.run(options, args)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 203, in wrapper
return func(self, options, args)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 286, in run
reqs = self.get_requirements(args, options, finder, session)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 364, in get_requirements
req_to_add = install_req_from_line(
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 382, in install_req_from_line
parts = parse_req_from_line(name, line_source)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 359, in parse_req_from_line
req: Optional[Requirement] = _parse_req_string(req_as_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 334, in _parse_req_string
add_msg += deduce_helpful_msg(req_as_string)
File "/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 144, in deduce_helpful_msg
next(parse_requirements(fp.read()))
File "/home/sidvash/anaconda3/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
WARNING: You are using pip version 21.2.3; however, version 21.2.4 is available.
You should consider upgrading via the '/home/sidvash/.cache/pypoetry/virtualenvs/package1-gxOcaWMk-py3.8/bin/python -m pip install --upgrade pip' command.
at ~/.poetry/lib/poetry/utils/env.py:1101 in _run
1097│ output = subprocess.check_output(
1098│ cmd, stderr=subprocess.STDOUT, **kwargs
1099│ )
1100│ except CalledProcessError as e:
→ 1101│ raise EnvCommandError(e, input=input_)
1102│
1103│ return decode(output)
1104│
1105│ def execute(self, bin, *args, **kwargs):
• Installing py (1.10.0)
• Installing rdflib (4.2.2)
• Installing typing (3.6.2)
• Installing wcwidth (0.2.5)
When I install this package through pipenv, using the following Pipenv file:
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
decomp = {git = "https://github.com/decompositional-semantics-initiative/decomp.git"}
[dev-packages]
[requires]
python_version = "3.8"
pipenv install runs perfectly fine with this package.
Please help!
Any help on this?
Anyone here?
Works fine for me with poetry 1.1.11.
@clintonroy do you have the new installer disabled?
I am able to reproduce this using the following.
podman run --rm -i --entrypoint bash python:3.8 <<EOF
set -xe
python -m pip install -q poetry
install -d foobar
pushd foobar
curl -sL --output pyproject.toml https://gist.githubusercontent.com/sidsvash26/7f2df4ecfc1950de1195853c50cc5552/raw/85bd9db8ca14e86d8ec6ec72fcb0f886065d8d51/pyproject.toml
poetry install
EOF
output:
Creating virtualenv package1-lWDpn5M1-py3.8 in /root/.cache/pypoetry/virtualenvs
Updating dependencies
Resolving dependencies... (96.9s)
Writing lock file
Package operations: 42 installs, 0 updates, 0 removals
• Installing wrapt (1.13.3)
• Installing certifi (2021.10.8)
• Installing chardet (3.0.4)
• Installing deprecated (1.2.13)
• Installing idna (2.8)
• Installing six (1.16.0)
• Installing urllib3 (1.25.11)
• Installing boto (2.49.0)
• Installing bottle (0.12.19)
• Installing click (8.0.3)
• Installing humanfriendly (10.0)
• Installing joblib (1.1.0)
• Installing networkx (2.6.3)
• Installing pycountry (20.7.3)
• Installing redis (4.0.1)
• Installing regex (2021.11.10)
• Installing requests (2.22.0)
• Installing thrift (0.11.0)
• Installing tqdm (4.62.3)
• Installing concrete (4.15.1)
• Installing future (0.18.2)
• Installing isodate (0.6.0)
• Installing jpype1 (1.3.0)
• Installing nltk (3.6.5)
• Installing pyparsing (2.2.0)
• Installing pystanforddependencies (0.3.1)
• Installing tabulate (0.8.9)
• Installing termcolor (1.1.0)
• Installing attrs (21.2.0)
• Installing memoized-property (1.0.3): Installing...
• Installing more-itertools (8.11.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0): Installing...
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing overrides (3.1.0)
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing more-itertools (8.11.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0)
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing memoized-property (1.0.3)
• Installing more-itertools (8.11.0)
• Installing numpy (1.21.1): Installing...
• Installing overrides (3.1.0)
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing overrides (3.1.0)
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
• Installing numpy (1.21.1)
• Installing overrides (3.1.0)
• Installing packaging (21.3)
• Installing pluggy (0.13.1)
• Installing predpatt (1.0.1 http://github.com/hltcoe/PredPatt/tarball/master): Failed
EnvCommandError
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
ERROR: Exception:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3250, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected W:(abcd...), found '/' (at char 0), (line:1, col:1)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 315, in _parse_req_string
req = get_requirement(req_as_string)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/utils/packaging.py", line 84, in get_requirement
return Requirement(req_string)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 104, in __init__
raise InvalidRequirement(
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'/root/.c'": Expected W:(abcd...)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
status = run_func(*args)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
return func(self, options, args)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 305, in run
reqs = self.get_requirements(args, options, finder, session)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 380, in get_requirements
req_to_add = install_req_from_line(
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 366, in install_req_from_line
parts = parse_req_from_line(name, line_source)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 343, in parse_req_from_line
req: Optional[Requirement] = _parse_req_string(req_as_string)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 319, in _parse_req_string
add_msg += deduce_helpful_msg(req_as_string)
File "/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 129, in deduce_helpful_msg
next(parse_requirements(fp.read()))
File "/usr/local/lib/python3.8/codecs.py", line 322, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte
at /usr/local/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
1179│ output = subprocess.check_output(
1180│ cmd, stderr=subprocess.STDOUT, **kwargs
1181│ )
1182│ except CalledProcessError as e:
→ 1183│ raise EnvCommandError(e, input=input_)
1184│
1185│ return decode(output)
1186│
1187│ def execute(self, bin, *args, **kwargs):
• Installing py (1.11.0)
• Installing rdflib (4.2.2)
• Installing typing (3.6.2)
• Installing wcwidth (0.2.5)
The root cause here is that pip is unable to parse the downloaded tarball in the cache as it is, unfortunately, named master and not ending with .tar.gz.
Command ['/root/.cache/pypoetry/virtualenvs/package1-lWDpn5M1-py3.8/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/29/0e/3e/8b843f752fd6db9a25d53506cd2d0e9c10f601b1f1d2a69a59ee604448/master'] errored with the following return code 2, and output:
Hence, it assumes that it is a PEP 508 string and attempts to parse it as such. This comes from the following line.
https://github.com/decompositional-semantics-initiative/decomp/blob/37e9191d1bd971ba20666ed73218920fd889ced6/setup.py#L23
And since Poetry treats that as a url dependency, its installer downloads it and caches it. We should really use the Content-Disposition header if available.
content-disposition: attachment; filename=hltcoe-PredPatt-v1.0.1-0-g34bc751.tar.gz
pip does something similar here.
https://github.com/pypa/pip/blob/330d0aad35d104514e6824d5b3bd5e7f787aeb19/src/pip/_internal/network/download.py#L78-L90
Yes, I do, my bad.
I would like to see this feature added :)
Files like the following are still not accepted ex) onnxruntime-gpu 1.18.0 https://aiinfra.pkgs.visualstudio.com/PublicPackages/_apis/packaging/feeds/9387c3aa-d9ad-4513-968c-383f6f7f53b8/pypi/packages/onnxruntime-gpu/versions/1.18/onnxruntime_gpu-1.18.0-cp310-cp310-manylinux_2_28_x86_64.whl/content