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.

Directory does not exist errors for path dependencies

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: MacOS Big Sur
  • Poetry version: 1.1.7
  • Link of a Gist with the contents of your pyproject.toml file: NA

Issue

v1.1.7 can cause path dependencies to not be found when packages are not all at the same directory depth. This appears to happen because the dependencies are searched for relative to the lockfile rather than relative to the lockfile and package.

As an example, for the directory structure

/
  pyproject.toml
  poetry.lock
  /lib
    /libA
      pyproject.toml
      poetry.lock
    /libB
      pyproject.toml
      poetry.lock

and relevant part of the poetry.lock file for the root

[[package]]
name = "lib-a"
version = "0.1.0"
description = ""
category = "main"
optional = false
python-versions = "^2.7.9"
develop = true

[package.dependencies]
lib-b = {path = "../libB", develop = true}

[package.source]
type = "directory"
url = "lib/libA"

[metadata]
lock-version = "1.1"
python-versions = "*"
content-hash = "115cf985d932e9bf5f540555bbdd75decbb62cac81e399375fc19f6277f8c1d8"

[metadata.files]
lib-a = []
lib-b = []

In 1.1.7, we get a Directory ../lib-b does not exist error because it tries to find the libB dependency at /../lib-b rather than /lib/libA/../libB.

This is likely a problem with previous versions of poetry but 1.1.7 changed the lockfiles for path dependencies to be paths rather than versions so becomes apparent when installing a package.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
skovhuscommented, Jul 8, 2021

I’m experiencing the same issue. Downgrading to 1.1.6 is a temporary workaround.

0reactions
dylan-sharpcommented, Jul 12, 2021

I downgraded poetry to v1.1.6 and still experience this same issue.

Maybe this is caused by you lock file being generated with a newer version of Poetry. Regenerating the lock file with 1.1.6 solved it for me.

So I played around a little and ended up getting it to work. I ended up getting it to work if I manually added the package to pyproject.toml, but when attempting to use poetry add <path> I get this same issue in 1.1.6.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Poetry with a path depedency on a package ... - Stack Overflow
The strange thing is that it does work when I use the same poetry.lock file in my docker. Is this related to --use-feature=in-tree-build...
Read more >
Gettting error zomato directory does not exist
I'm following the DataOps Platform Fundamentals course and the Build a Pipeline chapter has you enter “/zomato” as a files directory in the ......
Read more >
Dependency Checker errors - IBM
Errors. GYMWI0001E Directories missing from root user PATH The following directories are ... GYMWI0024E ORACLE_BASE directory /appl/oracle does not exist ...
Read more >
Errors – Vercel Docs
A list of errors provided by Vercel CLI or the REST API, with details on how they occur and how to resolve them....
Read more >
Dependency Scanning - GitLab Docs
Dependency Scanning does not support run-time installation of compilers and interpreters ... Exclude files and directories from the scan based on the paths....
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