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
I have searched the issue tracker and believe that this is not a duplicate.
Make sure you run commands with -v flag before pasting the output.
Steps to reproduce
In an empty directory on Debian OS
pdm init, pdm add local_file.whl
Create a new directory, copy pyproject.toml, pdm.lock, and local_file.whl to it
pdm sync in the new folder
Actual behavior
The same thing works well on Ubuntu, but not for Debian
$ pdm sync -v
Traceback (most recent call last):
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3101, in __init__
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/_vendor/packaging/requirements.py", line 101, in __init__
pkg_resources.extern.packaging.requirements.InvalidRequirement: Invalid URL given
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/username/.local/lib/python3.9/site-packages/pdm/models/requirements.py", line 489, in parse_requirement
package_req = PackageRequirement(line) # type: ignore
File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 3103, in __init__
pkg_resources.RequirementParseError: Invalid URL given
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/username/.local/bin/pdm", line 8, in<module>sys.exit(main())
File "/home/username/.local/lib/python3.9/site-packages/pdm/core.py", line 232, in main
returnCore().main(args)
File "/home/username/.local/lib/python3.9/site-packages/pdm/core.py", line 167, in main
raise cast(Exception, err).with_traceback(traceback)
File "/home/username/.local/lib/python3.9/site-packages/pdm/core.py", line 162, in main
f(options.project, options)
File "/home/username/.local/lib/python3.9/site-packages/pdm/cli/commands/sync.py", line 33, in handle
actions.do_sync(
File "/home/username/.local/lib/python3.9/site-packages/pdm/cli/actions.py", line 192, in do_sync
requirements.extend(project.get_dependencies(group).values())
File "/home/username/.local/lib/python3.9/site-packages/pdm/project/core.py", line 293, in get_dependencies
req = parse_requirement(line)
File "/home/username/.local/lib/python3.9/site-packages/pdm/models/requirements.py", line 494, in parse_requirement
r = FileRequirement.create(**m.groupdict())
File "/home/username/.local/lib/python3.9/site-packages/pdm/models/requirements.py", line 294, in create
returnsuper().create(**kwargs) # type: ignore
File "/home/username/.local/lib/python3.9/site-packages/pdm/models/requirements.py", line 160, in create
return cls(**kwargs)
File "<string>", line 12, in __init__
File "/home/username/.local/lib/python3.9/site-packages/pdm/models/requirements.py", line 280, in __post_init__
raise RequirementError(f"The local path {self.path} does not exist.")
pdm.exceptions.RequirementError: The local path local_file does not exist.
Make sure you run commands with
-v
flag before pasting the output.Steps to reproduce
pdm init
,pdm add local_file.whl
pyproject.toml
,pdm.lock
, andlocal_file.whl
to itpdm sync
in the new folderActual behavior
The same thing works well on Ubuntu, but not for Debian
Expected behavior
Find the local file and install it.
Environment Information
The text was updated successfully, but these errors were encountered: