question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValueError: Invalid fragment string

See original GitHub issue

I’m trying to convert existing requirements.txt file with:

pipenv install -r requirements.txt
Describe your environment
  1. Fedora 26
  2. Python version: 3
  3. Pipenv version: version 8.3.2
Expected result

Everything to be installed without errors

Actual result

It raises an error:

ValueError: Invalid fragment string egg=django-user-clipboard==0.6.1
Steps to replicate

You need to have requirements.txt file which will have URL entries pointing to package archive file but ending with #egg=<package-name>==<package.version>

For example:

https://github.com/IndustriaTech/django-user-clipboard/archive/0.6.1.zip#egg=django-user-clipboard==0.6.1

If you try to convert this requirements.txt file to Pipfile with pipenv install -r requirements.txt it will fail.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jpzcommented, Dec 29, 2017

I’ve encountered this also - here is an example requirements file that pipenv does not like - https://github.com/home-assistant/home-assistant/blob/dev/requirements_all.txt

ValueError: Invalid fragment string suds-passworddigest-py3==0.1.2a 
0reactions
techalchemycommented, Dec 22, 2017

@vstoykov but you’re just making up a number at that point. Internally, pip takes the number and (unless the path you supply is a file:// URI to a wheel) it just says ok, you told me it’s this version… cool whatever, still gonna install the thing you said. Ultimately it will get actual version info from the file.

Anyway we are having two conversations here. One relates to how we should build out our internals for handling requirements parsing, and the other relates to whether your syntax is valid/effective. I’d say that adding a specified to your URL probably isn’t doing anything at best, so the real question is just whether we adopt pip’s behavior of parsing links.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid fragment shader. Link cannot proceed - Stack Overflow
At the beginning of my project, I used simple String s for filling my both Shader s with code. This looked like this:...
Read more >
21.8. urllib.parse — Parse URLs into components
fragment, 5, Fragment identifier, empty string ... Reading the port attribute will raise a ValueError if an invalid port is specified in the...
Read more >
django.utils.http | Django documentation
Did you " "mean to pass an empty string or omit the value? ... m is not None: break else: raise ValueError("%r is...
Read more >
2. Values, expressions, and statements — Beginning Python ...
Strings in Python can be enclosed in either single quotes ( ' ) or double ... Valid variable names in Python must conform...
Read more >
Source code for schrodinger.structutils.build - Schrödinger
import string import warnings from functools import partial import contextlib ... then this fragment was not found in any library raise ValueError("Invalid ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found