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

Generating a requirements.txt file is broken on master #3216

Closed
greysteil opened this issue Nov 13, 2018 · 2 comments
Closed

Generating a requirements.txt file is broken on master #3216

greysteil opened this issue Nov 13, 2018 · 2 comments

Comments

@greysteil
Copy link
Contributor

greysteil commented Nov 13, 2018

Issue description

Running pyenv exec pipenv lock -r > req.txt should create a req.txt file with all the requirements that are in the lockfile. Instead it raises a key error.

(No biggie - just creating this issue because it's bust on master and I wouldn't want it to make it into a release! v2018.10.13 works just fine.)

Expected result

A req.txt file is generated correctly.

Actual result

Traceback (most recent call last):
  File "/Users/greysteil/.pyenv/versions/3.6.6/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv', 'console_scripts', 'pipenv')()
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/cli/command.py", line 319, in lock
    pre=state.installstate.pre,
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/core.py", line 1217, in do_init
    pypi_mirror=pypi_mirror,
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/core.py", line 711, in do_install_dependencies
    lockfile = project.get_or_create_lockfile()
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/project.py", line 863, in get_or_create_lockfile
    } for s in sources
  File "/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv/project.py", line 863, in <listcomp>
    } for s in sources
KeyError: 'name'

Steps to replicate

pyenv exec pipenv lock --verbose -r > req.txt with Pipenv at 1c9b929


$ pipenv --support

Pipenv version: '2018.10.14.dev0'

Pipenv location: '/Users/greysteil/code/dependabot-core/helpers/python/src/pipenv/pipenv'

Python location: '/Users/greysteil/.pyenv/versions/3.6.6/bin/python3.6'

Python installations found:

  • 3.7.0: /Users/greysteil/.pyenv/versions/3.7.0/bin/python3
  • 3.7.0: /Users/greysteil/.pyenv/versions/3.7.0/bin/python3.7m
  • 3.6.7: /Users/greysteil/.pyenv/versions/3.6.7/bin/python3
  • 3.6.7: /Users/greysteil/.pyenv/versions/3.6.7/bin/python3.6m
  • 3.6.6: /Users/greysteil/.pyenv/versions/3.6.6/bin/python3
  • 3.6.6: /Users/greysteil/.pyenv/versions/3.6.6/bin/python3.6m
  • 3.6.5: /Users/greysteil/.pyenv/versions/3.6.5/bin/python3
  • 3.6.5: /Users/greysteil/.pyenv/versions/3.6.5/bin/python3.6m
  • 3.6.5: /usr/local/bin/python3
  • 3.6.5: /usr/local/bin/python3.6m
  • 3.5.0: /Users/greysteil/.pyenv/versions/3.5.0/bin/python3
  • 3.5.0: /Users/greysteil/.pyenv/versions/3.5.0/bin/python3.5m
  • 2.7.15: /Users/greysteil/.pyenv/versions/2.7.15/bin/python
  • 2.7.14: /Users/greysteil/.pyenv/versions/2.7.14/bin/python
  • 2.7.10: /usr/bin/python
  • 2.7.10: /usr/bin/pythonw
  • 2.7.10: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.6.6',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '17.7.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 17.7.0: Wed Oct 10 23:06:14 PDT '
                     '2018; root:xnu-4570.71.13~1/RELEASE_X86_64',
 'python_full_version': '3.6.6',
 'python_version': '3.6',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_PROGRAM
  • PYENV_ROOT
  • TERM
  • SHELL
  • CLICOLOR
  • TMPDIR
  • Apple_PubSub_Socket_Render
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • PYENV_VERSION
  • USER
  • SSH_AUTH_SOCK
  • PYENV_DIR
  • LSCOLORS
  • PATH
  • PWD
  • EDITOR
  • LANG
  • PYENV_HOOK_PATH
  • XPC_FLAGS
  • RBENV_SHELL
  • XPC_SERVICE_NAME
  • HOME
  • SHLVL
  • LOGNAME
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_SHIMS_BASE_MODULE
  • PYTHONDONTWRITEBYTECODE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/greysteil/.pyenv/versions/3.6.6/bin:/usr/local/Cellar/pyenv/1.2.8/libexec:/Users/greysteil/.pyenv/plugins/pyenv-virtualenv/bin:/Users/greysteil/.pyenv/plugins/pyenv-update/bin:/Users/greysteil/.pyenv/plugins/pyenv-installer/bin:/Users/greysteil/.pyenv/plugins/pyenv-doctor/bin:/Users/greysteil/.poetry/bin:/Users/greysteil/.config/yarn/global/node_modules/.bin:/Users/greysteil/.poetry/bin::/Users/greysteil/go/bin::/usr/local/opt/erlang@20/bin:/Users/greysteil/.pyenv/bin:/Users/greysteil/.cargo/bin:/usr/local/heroku/bin:/Users/greysteil/.rbenv/shims:/usr/local/bin:./node_modules/.bin:.bundle/binstubs:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/usr/local/sbin
  • SHELL: /bin/bash
  • EDITOR: subl -w
  • LANG: en_GB.UTF-8
  • PWD: /Users/greysteil/code/python-test

Contents of Pipfile ('/Users/greysteil/code/python-test/Pipfile'):

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true

[dev-packages]
pytest = "===3.4.0"

[packages]
requests = "===2.18.0"

Contents of Pipfile.lock ('/Users/greysteil/code/python-test/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "d47662ae090ae8b438f77c7ed9b3d9c622cc62a65486c89aa9bc86a22f49fbb9"
        },
        "pipfile-spec": 6,
        "requires": {},
        "sources": [
            {
                "url": "https://pypi.python.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "certifi": {
            "hashes": [
                "sha256:339dc09518b07e2fa7eda5450740925974815557727d6bd35d319c1524a04a4c",
                "sha256:6d58c986d22b038c8c0df30d639f23a3e6d172a05c3583e766f4c0b785c0986a"
            ],
            "version": "==2018.10.15"
        },
        "chardet": {
            "hashes": [
                "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
                "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
            ],
            "version": "==3.0.4"
        },
        "idna": {
            "hashes": [
                "sha256:3cb5ce08046c4e3a560fc02f138d0ac63e00f8ce5901a56b32ec8b7994082aab",
                "sha256:cc19709fd6d0cbfed39ea875d29ba6d4e22c0cebc510a76d6302a28385e8bb70"
            ],
            "version": "==2.5"
        },
        "requests": {
            "hashes": [
                "sha256:5e88d64aa56ac0fda54e77fb9762ebc65879e171b746d5479a33c4082519d6c6",
                "sha256:cd0189f962787284bff715fddaad478eb4d9c15aa167bd64e52ea0f661e7ea5c"
            ],
            "version": "==2.18.0"
        },
        "urllib3": {
            "hashes": [
                "sha256:8ed6d5c1ff9d6ba84677310060d6a3a78ca3072ce0684cb3c645023009c114b1",
                "sha256:b14486978518ca0901a76ba973d7821047409d7f726f22156b24e83fd71382a5"
            ],
            "version": "==1.21.1"
        }
    },
    "develop": {
        "attrs": {
            "hashes": [
                "sha256:10cbf6e27dbce8c30807caf056c8eb50917e0eaafe86347671b57254006c3e69",
                "sha256:ca4be454458f9dec299268d472aaa5a11f67a4ff70093396e1ceae9c76cf4bbb"
            ],
            "version": "==18.2.0"
        },
        "pluggy": {
            "hashes": [
                "sha256:7f8ae7f5bdf75671a718d2daf0a64b7885f74510bcd98b1a0bb420eb9a9d0cff",
                "sha256:d345c8fe681115900d6da8d048ba67c25df42973bda370783cd58826442dcd7c",
                "sha256:e160a7fcf25762bb60efc7e171d4497ff1d8d2d75a3d0df7a21b76821ecbf5c5"
            ],
            "version": "==0.6.0"
        },
        "py": {
            "hashes": [
                "sha256:bf92637198836372b520efcba9e020c330123be8ce527e535d185ed4b6f45694",
                "sha256:e76826342cefe3c3d5f7e8ee4316b80d1dd8a300781612ddbc765c17ba25a6c6"
            ],
            "version": "==1.7.0"
        },
        "pytest": {
            "hashes": [
                "sha256:6074ea3b9c999bd6d0df5fa9d12dd95ccd23550df2a582f5f5b848331d2e82ca",
                "sha256:95fa025cd6deb5d937e04e368a00552332b58cae23f63b76c8c540ff1733ab6d"
            ],
            "version": "==3.4.0"
        },
        "six": {
            "hashes": [
                "sha256:70e8a77beed4562e7f14fe23a786b54f6296e34344c23bc42f07b15018ff98e9",
                "sha256:832dc0e10feb1aa2c68dcc57dbb658f1c7e65b9b61af69048abc87a2db00a0eb"
            ],
            "version": "==1.11.0"
        }
    }
}
@techalchemy
Copy link
Member

@greysteil does it work if you try against #3217?

@greysteil
Copy link
Contributor Author

@techalchemy afraid not - I get

Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==2018.10.14.dev0', 'console_scripts', 'pipenv')()
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/cli/command.py", line 319, in lock
    pre=state.installstate.pre,
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/core.py", line 1231, in do_init
    pypi_mirror=pypi_mirror,
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/core.py", line 780, in do_install_dependencies
    lockfile = project.get_or_create_lockfile()
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/project.py", line 757, in get_or_create_lockfile
    } for s in sources
  File "/usr/local/lib/python3.6/site-packages/pipenv-2018.10.14.dev0-py3.6.egg/pipenv/project.py", line 757, in <listcomp>
    } for s in sources
KeyError: 'name'

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

2 participants