Skip to content

Pipenv does not sync indexes to lockfile #5508

Closed
@NicoStellwag

Description

Issue description

When specifying an addtitional index as described here, pipenv install does not synchronize the additional index to the lockfile, resulting in the following error:

...
Installing dependencies from Pipfile.lock (4204ea)...
Traceback (most recent call last):
  File "c:\python\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\python\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
...
    install_source = next(filter(lambda s: s["name"] == index_name, sources))
StopIteration

System:
OS: Windows Server 2019
Python: 3.9.1
Pipenv: 2022.11.25

When updating Pipfile.lock manually, everything works as expected.

Expected result

Pipfile.lock:

...
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            },
            {
                "name": "pytorch",
                "url": "https://download.pytorch.org/whl/cu116",
                "verify_ssl": false
            }
        ]
...

Actual result

Pipfile.lock:

...
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
...

Steps to replicate

Minimal Pipfile:

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

[[source]]
url = "https://download.pytorch.org/whl/cu116"
verify_ssl = false
name = "pytorch"

[packages]
torch = {version = "*", index = "pytorch"}

[dev-packages]

[requires]
python_version = "3.9"
python_full_version = "3.9.1"


Unfortunately I cannot provide pipenv --support from my work PC.

Metadata

Assignees

No one assigned

    Labels

    Priority: HighThis item is high priority and should be resolved quickly.Type: Bug 🐛This issue is a bug.Type: RegressionThis issue is a regression of a previous behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions