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

KeyError with pdm lock --refresh and using url/git hash #1361

Closed
blueyed opened this issue Sep 5, 2022 · 1 comment
Closed

KeyError with pdm lock --refresh and using url/git hash #1361

blueyed opened this issue Sep 5, 2022 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@blueyed
Copy link
Contributor

blueyed commented Sep 5, 2022

I am getting the following error with pdm lock --refresh, bisected to commit 0319842 (fix: store dependencies by name and version (#1308)):

Traceback (most recent call last):
  File "…/project/.venv/bin/pdm", line 8, in <module>
    sys.exit(main())
  File "…/project/.venv/lib/python3.10/site-packages/pdm/core.py", line 254, in main
    return Core().main(args)
  File "…/project/.venv/lib/python3.10/site-packages/pdm/core.py", line 187, in main
    raise cast(Exception, err).with_traceback(traceback)
  File "…/project/.venv/lib/python3.10/site-packages/pdm/core.py", line 182, in main
    f(options.project, options)
  File "…/project/.venv/lib/python3.10/site-packages/pdm/cli/commands/lock.py", line 27, in handle
    actions.do_lock(
  File "…/project/.venv/lib/python3.10/site-packages/pdm/cli/actions.py", line 82, in do_lock
    lockfile = format_lockfile(project, mapping, dependencies)
  File "…/project/.venv/lib/python3.10/site-packages/pdm/cli/utils.py", line 459, in format_lockfile
    sorted(r.as_line() for r in fetched_dependencies[v.dep_key]), True
KeyError: ('django-fsm-admin', '1.2.4')

From pdm.lock:

[[package]]
name = "django-fsm-admin"
version = "1.2.4"
url = "https://github.com/private/django-fsm-admin/archive/38f2719935be16a7c01d110651ad8ea8383bbe1d.zip"
summary = "Integrate django-fsm state transitions into the django admin"
dependencies = [
    "Django>=1.6",
    "django-fsm>=2.1.0",
]
…
"django-fsm-admin 1.2.4" = [
    {url = "https://github.com/private/django-fsm-admin/archive/38f2719935be16a7c01d110651ad8ea8383bbe1d.zip", hash = "sha256:32bc3205cec3ec83a78dd0fd0b5f02f25d81a9689493c2580c8fdb4e02c6f4ec"},
]
@blueyed blueyed added the 🐛 bug Something isn't working label Sep 5, 2022
@blueyed
Copy link
Contributor Author

blueyed commented Sep 5, 2022

Thanks for the quick fix - I can confirm it to be fixed for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant