Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create requirement from this particular pip freeze output #49

Open
skrawcz opened this issue Aug 14, 2020 · 0 comments
Open

Cannot create requirement from this particular pip freeze output #49

skrawcz opened this issue Aug 14, 2020 · 0 comments

Comments

@skrawcz
Copy link

skrawcz commented Aug 14, 2020

If you install a package in a subdirectory from git, e.g.

git+ssh://[email protected]/my/repo.git@project25#egg=PACKAGE_NAME&subdirectory=SUB_DIR/

and then do a pip freeze you'll instead get:

PACKAGE_NAME @ git+ssh://[email protected]/my/repo.git@3684f02bf928cae39d10d1d9b478d95d2267b2af#subdirectory=SUB_DIR/

In which case this cannot be parsed (redacted with parts I can't share):

 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/requirements/parser.py", line 50, in parse    yield Requirement.parse(line)
 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/requirements/requirement.py", line 220, in parse    return cls.parse_line(line)
 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/requirements/requirement.py", line 198, in parse_line    pkg_req = Req.parse(line)
 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3155, in parse    req, = parse_requirements(s)

Traceback (most recent call last):
 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3108, in __init__    super(Requirement, self).__init__(requirement_string)
 File "/stitchfix/z-pyenv/pyenv/versions/3.6/lib/python3.6/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 101, in __init__    raise InvalidRequirement("Invalid URL given")
  pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid URL given
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant