Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Getting Cannot execute /home/user/.poetry/bin/poetry error when configuring the poetry environment #196

@michaelwiles

Description

@michaelwiles

Describe the bug
When I setup my poetry environment it correctly auto detects the poetry executable but it says it is not executable. The file is there and it is "executable".

To Reproduce
Steps to reproduce the behavior:

  1. Add environment
  2. Select poetry environment
  3. set correct poetry executable
  4. See error

Expected behavior
That the poetry executable gets correctly set.

Environments (please complete the following information):

  • IDE: PyCharm Community 2021.1 EAP (same issue with 2020.3)
  • OS: ubuntu 20.10
  • Poetry Version [e.g. 1.0.8 ]
  • Plugin version 1.1.5

Additional context
This is the relevant method AFAICT

fun validatePoetryExecutable(poetryExecutable: @SystemDependent String?): ValidationInfo? {
    val message = if (poetryExecutable.isNullOrBlank()) {
        "Poetry executable is not found"
    }
    else {
        val file = File(poetryExecutable)
        when {
            !file.exists() -> "File ${file.absolutePath} is not found"
            !file.canExecute() || !file.isFile -> "Cannot execute ${file.absolutePath}"
            else -> null
        }
    }

    return message?.let { ValidationInfo(it) }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions