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

Pipenv fails badly when installing with --deploy with an outdated lockfile. #4022

Closed
fabiogibson opened this issue Nov 13, 2019 · 2 comments
Closed
Labels

Comments

@fabiogibson
Copy link

Issue description

When installing using "--deploy" with an outdated Pipfile, Pipenv fails with an exception.

Expected result

Pipenv should notify the lockfile is outdated and exit gracefully.

Actual result

Your Pipfile.lock (ee5679) is out of date. Expected: (c5ad03).
Traceback (most recent call last):
  File "/usr/local/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/pipenv/cli/command.py", line 235, in install
    retcode = do_install(
  File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 1863, in do_install
    do_init(
  File "/usr/local/lib/python3.8/site-packages/pipenv/core.py", line 1192, in do_init
    raise exceptions.DeployException
  File "/usr/local/lib/python3.8/site-packages/pipenv/exceptions.py", line 168, in __init__
    PipenvUsageError.__init__(message=fix_utf8(message), extra=extra, **kwargs)
TypeError: __init__() missing 1 required positional argument: 'self'

Steps to replicate

  • pipenv --three
  • edit Pipfile and add a dependency. Ex: pycodestyle = "==2.4.0"
  • pipenv lock
  • edit Pipfile: Ex: pycodestyle = "==2.5.0"
  • pipenv install --deploy

Please run $ pipenv --support, and paste the results here. Don't put backticks (`) around it! The output already contains Markdown formatting.

$ pipenv --support

Pipenv version: '2018.11.26'

Pipenv location: '/usr/local/lib/python3.8/site-packages/pipenv'

Python location: '/usr/local/bin/python'

Python installations found:

  • 3.8.0: /usr/local/bin/python
  • 3.7.3: /usr/bin/python3.7
  • 3.7.3: /usr/bin/python3.7m
  • 2.7.16: /usr/bin/python

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.0',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.2.21-1-MANJARO',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP PREEMPT Sat Oct 12 11:09:56 UTC 2019',
 'python_full_version': '3.8.0',
 'python_version': '3.8',
 'sys_platform': 'linux'}

System environment variables:

  • HOSTNAME
  • PYTHON_PIP_VERSION
  • HOME
  • GPG_KEY
  • PYTHON_GET_PIP_URL
  • PATH
  • LANG
  • PYTHON_VERSION
  • PWD
  • PYTHON_GET_PIP_SHA256
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  • LANG: C.UTF-8
  • PWD: /

Contents of Pipfile ('/Pipfile'):

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

[dev-packages]

[packages]
pycodestyle = "==2.5.0"

[requires]
python_version = "3.8"

Contents of Pipfile.lock ('/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "ec2f93366a5196a3e49f40dd0b76f7163aa82c379ea6bc56a6687d3ef1ee5679"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.8"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "pycodestyle": {
            "hashes": [
                "sha256:cbc619d09254895b0d12c2c691e237b2e91e9b2ecf5e84c26b35400f93dcfb83",
                "sha256:cbfca99bd594a10f674d0cd97a3d802a1fdef635d4361e1a2658de47ed261e3a"
            ],
            "index": "pypi",
            "version": "==2.4.0"
        }
    },
    "develop": {}
}
@nicktimko
Copy link

Duplicate of #3560 and is likely fixed in master.

@jedie
Copy link

jedie commented Mar 13, 2020

Duplicate of #3560 and is likely fixed in master.

Gread. But not released, yet? I see the same error in pipenv-2018.11.26
Hope #3369 is coming, soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants