Relative path cannot be found
See original GitHub issue-
I am on the latest Poetry version.
-
I have searched the issues of this repo and believe that this is not a duplicate.
-
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option). -
OS version and name: Windows 10
-
Poetry version: 1.1.3
-
Repo with bug: https://github.com/jonapich/test-poetry-relative-paths
Issue
Depending on a module through a relative path that also depends on a relative path broke between 1.0.10 and 1.1.0.
The issue only seems to occur with nested packages. It works with one relative path, but if this path also contains a relative path dependency, that’s when the bug occurs.
Following the steps in the readme of the linked repository will lead to this error:
Command C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\Scripts\pip.exe install --no-deps -U C:/Users/user/code/test-poetry-relative-paths/test-functools/test-poetry-relative-paths/test-testing errored with the following return code 1, and output:
Processing c:\users\user\code\test-poetry-relative-paths\test-functools\test-poetry-relative-paths\test-testing
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\Scripts\python.exe' 'C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\user\AppData\Local\Temp\tmp6_drxiht'
cwd: C:\Users\user\AppData\Local\Temp\pip-req-build-6vl779_r
Complete output (16 lines):
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\user\AppData\Local\pypoetry\Cache\virtualenvs\test-functools-dloyykXv-py3.8\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\user\AppData\Local\Temp\pip-build-env-8git_pgc\overlay\Lib\site-packages\poetry\core\masonry\api.py", line 34, in prepare_metadata_for_build_wheel
poetry = Factory().create_poetry(Path(".").resolve())
File "C:\Users\user\AppData\Local\Temp\pip-build-env-8git_pgc\overlay\Lib\site-packages\poetry\core\factory.py", line 91, in create_poetry
self.create_dependency(name, constraint, root_dir=package.root_dir)
File "C:\Users\user\AppData\Local\Temp\pip-build-env-8git_pgc\overlay\Lib\site-packages\poetry\core\factory.py", line 242, in create_dependency
dependency = DirectoryDependency(
File "C:\Users\user\AppData\Local\Temp\pip-build-env-8git_pgc\overlay\Lib\site-packages\poetry\core\packages\directory_dependency.py", line 36, in __init__
raise ValueError("Directory {} does not exist".format(self._path))
ValueError: Directory ..\test-lib does not exist
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
File cannot be found when relative path is used - Stack Overflow
I created in the project a new Folder “Reports” and placed the .xml there. I show the report using C1DocumentViewer . When provide...
Read more >"Relative path cannot be assigned" when attaching an xref in ...
Solution: · Cancel the "Attach External Reference" dialog window and save the host file. · Copy the xref file to the same location...
Read more >Message "Relative path cannot be assigned" trying to set ...
You cannot use a relative path if the xref is stored on a different disk (obviously) or network share than the main drawing,...
Read more >Paths explained: Absolute, relative, UNC, and URL—Help
A relative path refers to a location that is relative to a current directory. Relative paths make use of two special symbols, a...
Read more >Relative Path External References are missing when reopened
AutoCAD: Relative Path External References are missing when reopened. (PDF's, Raster Images, etc). Solution: Use absolute path. Type “XREF” at ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
aaah ha: https://github.com/python-poetry/poetry/issues/3094 https://github.com/python/mypy/pull/8847
all good, thanks!
😮
Hey how about an update to the exception text to suggest this? This has been preventing me to go forward for weeks 😅