basedpyright icon indicating copy to clipboard operation
basedpyright copied to clipboard

[Bug] `pythonPath` configuration option not recognized after `basedpyright` update

Open pidgeon777 opened this issue 1 year ago • 1 comments

After a basedpyright update, I have this error when LSP is started:

unknown config option: pythonPath

My pyrightconfig.json is:

{
  "venvPath": "C:/Users/<USERNAME>/scoop/persist/miniconda3/envs",
  "venv": "common",
  "pythonPath": "C:/Users/<USERNAME>/scoop/apps/miniconda3/current/python.exe",

  "include": [
        "./*" // Includes all files in the root directory and subdirectories
      ],
  "exclude": [
        "**/node_modules", // Commonly excluded in many projects
        "**/__pycache__", // Exclude Python cache directories
        "**/.venv", // Exclude virtual environments
        "**/venv", // Exclude virtual environments
        ".git", // Exclude git directory
        "*/site-packages/" // Exclude site-packages directories if not desired
      ],
}

This configuration was working before the update.

pidgeon777 avatar Aug 21 '24 12:08 pidgeon777

i don't think pythonPath was ever a valid option in pyrightconfig.json. it's not present in the configuration docs, only in the language server settings.

the reason you're only now seeing this error is because i made a change recently that reports invalid config as a notification in the language server instead of just silently logging it: #561

i'm pretty sure that means the setting wasn't doing anything and you can probably just remove it from your pyrightconfig.json. it should just automatically detect your python interpreter

DetachHead avatar Aug 21 '24 13:08 DetachHead

closing this, let us know if you are still having issues and we can re-open and investigate if needed

DetachHead avatar Sep 21 '24 05:09 DetachHead