Skip to content

python-django devfile debug command fails when component starts in pod making remote degugging impossible #876

Closed
devfile/registry
#117
@dgolovin

Description

@dgolovin

/kind bug

Which area this bug is related to?

/area registry

What versions of software are you using?

Operating System: n/a

Go Pkg Version: n/a

Bug Summary

Describe the bug:

https://registry.devfile.io/devfiles/python-django devfile debug command fails with error when pushed to cluster using odo 2.5.1

Executing command cd ${PROJECT_SOURCE} && pip install --user debugpy && export DEBUG_MODE=True && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} manage.py runserver 0.0.0.0:8000 --noreload --nothreading
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

As a result vscode python cannot connect to localhost port forwarded with odo debug port-forward,

To Reproduce:

  1. odo create python-django
  2. odo push
  3. odo log | grep ERROR

Expected behavior

No error during debug command execution

Any logs, error output, screenshots etc? Provide the devfile that sees this bug, if applicable.

Executing command cd ${PROJECT_SOURCE} && pip install --user debugpy && export DEBUG_MODE=True && python -m debugpy --listen 0.0.0.0:${DEBUG_PORT} manage.py runserver 0.0.0.0:8000 --noreload --nothreading
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

Additional context

Any workaround?

Removing --user form debug command fixes the issue

Suggestion on how to fix the bug

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions