Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Invalid message: "pythonPath" is not valid if "python" is specified" when running FastAPI in debug container #20808

Closed
thomasmartinhudson opened this issue Mar 7, 2023 · 1 comment
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@thomasmartinhudson
Copy link

thomasmartinhudson commented Mar 7, 2023

Type: Bug

Behaviour

Expected vs. Actual

Cannot start Python debug container from VSCode version 1.75+ (Works fine in 1.74) on Ubuntu 20.04

Steps to reproduce:

  1. Create task:
        {
            "name": "A debug task in docker container",
            "type": "docker",
            "request": "launch",
            "preLaunchTask": "docker-run: task to spin up fastAPI server in container",
            "python": {
                "pathMappings": [
                    {
                        "localRoot": "${workspaceFolder}/backend/application",
                        "remoteRoot": "/application"
                    }
                ],
                "projectType": "fastapi"
            },
            "containerName": "fast-api-container",
            "removeContainerAfterDebug": true,
        },
  1. Run debug task
  2. Error trying to couple Python to container pythonPath:
    221821846-570f97c0-c60e-4274-a07f-5edc15f7aafb

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.2
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Poetry
  • Value of the python.languageServer setting: Pylance
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


envFile: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• mypyArgs: "<placeholder>"
• mypyEnabled: true

formatting
• provider: "black"
• blackArgs: "<placeholder>"

testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true

Extension version: 2022.20.1
VS Code version: Code 1.74.3 (97dec172d3256f8ca4bfb2143f3f76b503ca0534, 2023-01-09T16:57:40.428Z)
OS version: Linux x64 5.15.0-67-generic
Modes:
Sandboxed: No

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 x 2300)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 1, 1
Memory (System) 31.08GB (22.99GB free)
Process Argv 9fin/9admin/ --crash-reporter-id 1839f185-4d00-41f5-9c93-6163766b458d
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vsdfh931:30280409
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593:30376534
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vscccc:30610679
pyindex848:30662994
nodejswelcome1:30587005
2e4cg342:30602488
pyind779:30671433
89544117:30613380
pythonsymbol12:30671437
6233i204:30672705

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Mar 7, 2023
@karthiknadig
Copy link
Member

Duplicate of #20655

Please try the pre-release version of the python extension this is fixed.

@karthiknadig karthiknadig closed this as not planned Won't fix, can't repro, duplicate, stale Mar 7, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

2 participants