You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ pdm export -v
Traceback (most recent call last):
File "/Users/my_user/.local/bin/pdm", line 8, in<module>sys.exit(main())
File "/Users/my_user/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 68, in __call__
return self.main(*args, **kwargs)
File "/Users/my_user/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 100, in main
raise err.with_traceback(traceback)
File "/Users/my_user/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/core.py", line 96, in main
f(options.project, options)
File "/Users/my_user/.local/pipx/venvs/pdm/lib/python3.8/site-packages/pdm/cli/commands/export.py", line 41, in handle
temp.pop(project.meta.name)
KeyError: None
Expected behavior
❯ pdm export
click==7.1.2; python_version >= "2.7" and python_version not in"3.0, 3.1, 3.2, 3.3, 3.4" \
--hash=sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc \
--hash=sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a```...
When exporting dependencies from a project which is not a library (is not self installable) an error is raised due to it not being available in the calculated dependencies.
https://github.com/frostming/pdm/blob/master/pdm/cli/commands/export.py#L40-L41
A simple solution is to change line https://github.com/frostming/pdm/blob/master/pdm/cli/commands/export.py#L41 to
temp.pop(project.meta.name, None)
.Steps to reproduce
pdm init
) and remove name and version frompyproject.toml
site-packages
from python path #100 (comment)pdm add flask
)pdm export
Actual behavior
Expected behavior
Environment Information
The text was updated successfully, but these errors were encountered: