Pipenv: Unable to install `git` URLs with pipenv

Created on 23 Jan 2017  ·  7Comments  ·  Source: pypa/pipenv

Running the command:

zackkitzmiller at Sol in ~/Apps/seatgeek/api on master [?] ⇣
❯ pipenv install git+https://github.com/pyotp/[email protected]                                                                              13:55
Installing git+https://github.com/pyotp/[email protected]...
Collecting git+https://github.com/pyotp/[email protected]
  Cloning https://github.com/pyotp/pyotp.git (to v2.0.1) to /private/var/folders/08/scd34rrx47n2z9b8y88r93kh0000gn/T/pip-0HX3au-build
  Requirement already satisfied (use --upgrade to upgrade): pyotp==2.0.1 from git+https://github.com/pyotp/[email protected] in ./.venv/lib/python2.7/site-packages

Adding git+https://github.com/pyotp/[email protected] to Pipfile's [packages]...

Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/pipenv/cli.py", line 374, in install
    project.add_package_to_pipfile(package_name, dev)
  File "/usr/local/lib/python2.7/site-packages/pipenv/project.py", line 91, in add_package_to_pipfile
    data = format_toml(toml.dumps(p))
  File "/usr/local/lib/python2.7/site-packages/toml.py", line 602, in dumps
    addtoretval, addtosections = _dump_sections(sections[section], section)
  File "/usr/local/lib/python2.7/site-packages/toml.py", line 619, in _dump_sections
    if not re.match(r'^[A-Za-z0-9_-]+$', section):
  File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 141, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

The value of p on project.py on line 90:

{u'source': [{u'url': u'https://pypi.org/', u'verify_ssl': True}], u'packages': {u'nose-exclude': u'==0.2.0', u'repoze.lru': u'==0.6', u'Fabric': u'==1.8.3', u'backports.ssl-match-hostname': u'==3.4.0.2', u'Flask': u'==0.10.1', u'boto3': u'==1.4.1', u'fake-factory': u'==0.7.2', u'gevent': u'==1.0.1', u'phpserialize': u'==1.3', u'MySQL-python': u'==1.2.3', u'Werkzeug': u'==0.10.4', u'newrelic': u'==2.60.0.46', u'qrcode': u'==5.1', u'botocore': u'==1.4.12', u'docopt': u'==0.6.2', u'amqp-dispatcher': u'==0.8.0', u'py-bcrypt': u'==0.4', u'fuzzywuzzy': u'==0.2', u'haigha': u'==0.9.0', u'inflector': u'==2.0.11', u'hashids': u'==1.1.0', u'toro': u'==1.0.1', u'six': u'==1.9.0', u'redis': u'==2.10.3', u'suds-jurko': u'==0.6', u'tornado': u'==3.2', u'Sift': u'==3.0.0.0', u'elaphe': u'==0.6.0', u'Jinja2': u'==2.8', u'paramiko': u'==1.12.4', u'Fuzzy': u'==1.0', u'itsdangerous': u'==0.24', u'ndg-httpsclient': u'==0.4.0', u'ecdsa': u'==0.11', u'mock': u'==1.0.0', u'nose_parameterized': u'==0.5.0', u'Unidecode': u'==0.4.9', u'PyYAML': u'==3.11', u'SQLAlchemy': u'==0.6.6', u'gunicorn': u'==18.0', u'factory-boy': u'==2.7.0', u'fakeredis': u'==0.6.2', u'intervaltree': u'==2.1.0', u'urllib3': u'==1.7.1', u'httmock': u'==1.2.3', u'iso8601': u'==0.1.8', u'MarkupSafe': u'==0.23', u'lxml': u'==3.4.1', u'httplib2': u'==0.9', u'coverage': u'==3.7.1', u'python-dateutil': u'==1.5', u'freezegun': u'==0.1.7', u'beautifulsoup4': u'==4.3.2', u'Pillow': u'==2.8.1', u'decorator': u'==3.3.2', u'pika': u'==0.10.0', u'pygeoip': u'==0.2.7', u'ujson': u'==1.34', u'oauth2': u'==1.5.211', u'coveralls': u'==0.5', u'pycurl': u'==7.43.0', u'boto': u'==2.37.0', u'Quadtree': u'==0.1.2', u'pyOpenSSL': u'==0.15.1', u'httpretty': u'==0.8.3', None: {u'git': u'https://github.com/pyotp/pyotp.git', 'ref': u'v2.0.1'}, u'futures': u'==2.1.6', u'timelib': u'==0.2.2', u'mockredispy': u'==2.9.0.9', u'testhttpserver': u'==0.1.4', u'xmltodict': u'==0.8.6', u'python-Levenshtein': u'==0.10.2', u'pytz': u'==2011j', u'greenlet': u'==0.4.7', u'nose': u'==1.3.3', u'statsd': u'==3.2.1', u'paypalrestsdk': u'==1.11.5', u'pycrypto': u'==2.6.1', u'requests': u'==2.4.3', u'raven': u'==5.8.1', u'pyasn1': u'==0.1.9', u'braintree': u'==3.24.0'}}

There is a None key in there.

Most helpful comment

@kennethreitz Should the failure be more graceful? I wasn't sure exactly what to do.

All 7 comments

Let's add a test for this

$ pipenv install git+https://github.com/pyotp/[email protected]

I think you need egg= currently

there's no way to know the name of the package otherwise

@kennethreitz Thanks, that got me moving for now.

closing for now, i thing eggs will simply be required

@kennethreitz Should the failure be more graceful? I wasn't sure exactly what to do.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ipmb picture ipmb  ·  3Comments

bgjelstrup picture bgjelstrup  ·  3Comments

hynek picture hynek  ·  3Comments

jacek-jablonski picture jacek-jablonski  ·  3Comments

fbender picture fbender  ·  3Comments