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.

REGR: pipenv sync StopIteration error with 2022.11.05

See original GitHub issue

Note: Works fine with pipenv==2022.10.25

Issue description

Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing dependencies from Pipfile.lock (e67ab7)...
Traceback (most recent call last):
  File "/opt/venv/bin/pipenv", line 8, in <module>
    sys.exit(cli())
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/cli/options.py", line 57, in main
    return super().main(*args, **kwargs, windows_expand_args=False)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/decorators.py", line 84, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/vendor/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/venv/lib/python3.9/site-packages/pipenv/cli/command.py", line 646, in sync
    retcode = do_sync(
  File "/opt/venv/lib/python3.9/site-packages/pipenv/core.py", line 3145, in do_sync
    do_init(
  File "/opt/venv/lib/python3.9/site-packages/pipenv/core.py", line 1378, in do_init
    do_install_dependencies(
  File "/opt/venv/lib/python3.9/site-packages/pipenv/core.py", line 888, in do_install_dependencies
    batch_install(
  File "/opt/venv/lib/python3.9/site-packages/pipenv/core.py", line 742, in batch_install
    install_source = next(filter(lambda s: s["name"] == index_name, sources))
StopIteration

Expected result

No failure.

Actual result

StopIteration

Steps to replicate

pipenv sync --dev

Operating System: Ubuntu 20.04 LTS Python Version: 3.9

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:2
  • Comments:10

github_iconTop GitHub Comments

1reaction
snowman2commented, Nov 9, 2022

I wonder how its possible for the Pipfile.lock to end up with different source names that the Pipfile?

The problem originated from the Pipfile with incorrect index.

1reaction
tonispringcommented, Nov 9, 2022

Ideally pipenv could raise with a message about the issue when it encounters a name mismatch, we ran into the same problem and it was confusing finding the cause since it required understanding the pipenv source code that was raising StopIteration

Read more comments on GitHub >

github_iconTop Results From Across the Web

Release and Version History — pipenv 2022.12.20.dev0 ...
Fix regression: pipenv does not sync indexes to lockfile. ... Solving issue where pipenv check command has been broken in the published wheel...
Read more >
StopIteration error while trying to build data input for a model
StopIteration means the iterable is empty, you also get it in a case like this: >>> next(iter([])) Traceback (most recent call last): File ......
Read more >
Issues · pypa/pipenv · GitHub
REGR : pipenv sync StopIteration error with 2022.11.05 triage Type: Enhancement This is an enhancement request. #5462 opened 20 days ago by snowman2....
Read more >
Python Packaging Authority pipenv Issues - Giters
Python Packaging Authority pipenv: Python Development Workflow for Humans. ... REGR: pipenv sync StopIteration error with 2022.11.05. Updated a month ago 10 ...
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