You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I watched the "Best Practices for Compose-managed Python Apps", thx for that! super informative and helpful.
I then tried to follow the same steps to debug the
project I'm working on: https://github.com/encointer/polkascan-os
My goal is to debug the explorer-api, which is a falcon (python) app.
So I:
added the port 5678 in the docker-compose file.
added the entry ptvsd==4.3.2 in the requirements.txt file
added the code snipped ptvsd.enable_attach(address=('0.0.0.0',5678)) // why 0.0.0.0 here?
docker-compose build and than docker-compose up
in vscode, I added the configuration file with "localRoot": "${workspaceFolder}/explorer-api/app" and
"remoteRoot": "/usr/src/app/app/" // here I add the folder that points to main.py, is this correct?
The error I'm getting is: OSError: [Errno 98] Address already in use
I struggle to understand, where the problem is, I guess somehow this port is already in use, but if i change the port, the same error appears which leads me to think, that somehow the debugger or so creates 2 instances that try to connect to that port.
I'm not sure this is the correct place to file the issue, if somebody knows a solution or a better place to get answers to my question, I'd be very thankful.
Here is the error message trace log (i get it 3x):
ptvsd.enable_attach(address=('0.0.0.0',5678))
File "/usr/local/lib/python3.8/site-packages/ptvsd/attach_server.py", line 101, in enable_attach
ptvsd_enable_attach(address)
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 76, in enable_attach
pydevd.settrace(host=host,
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 2169, in settrace
_locked_settrace(
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 2230, in _locked_settrace
debugger.connect(host, port) # Note: connect can raise error.
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 1060, in connect
s = start_client(host, port)
File "/usr/local/lib/python3.8/site-packages/ptvsd/pydevd_hooks.py", line 136, in _start_client
return start_client(daemon, h, p)
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 62, in
start_client=(lambda daemon, h, port: start_daemon()),
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 50, in start_daemon
_, next_session = daemon.start_server(addr=(host, port))
File "/usr/local/lib/python3.8/site-packages/ptvsd/daemon.py", line 161, in start_server
self._server = create_server(addr.host, addr.port)
File "/usr/local/lib/python3.8/site-packages/ptvsd/socket.py", line 79, in create_server
server.bind((host, port))
OSError: [Errno 98] Address already in use
The text was updated successfully, but these errors were encountered:
I watched the "Best Practices for Compose-managed Python Apps", thx for that! super informative and helpful.
I then tried to follow the same steps to debug the
project I'm working on: https://github.com/encointer/polkascan-os
My goal is to debug the explorer-api, which is a falcon (python) app.
So I:
"remoteRoot": "/usr/src/app/app/" // here I add the folder that points to main.py, is this correct?
The error I'm getting is: OSError: [Errno 98] Address already in use
I struggle to understand, where the problem is, I guess somehow this port is already in use, but if i change the port, the same error appears which leads me to think, that somehow the debugger or so creates 2 instances that try to connect to that port.
I'm not sure this is the correct place to file the issue, if somebody knows a solution or a better place to get answers to my question, I'd be very thankful.
Here is the error message trace log (i get it 3x):
File "/usr/local/lib/python3.8/site-packages/ptvsd/attach_server.py", line 101, in enable_attach
ptvsd_enable_attach(address)
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 76, in enable_attach
pydevd.settrace(host=host,
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 2169, in settrace
_locked_settrace(
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 2230, in _locked_settrace
debugger.connect(host, port) # Note: connect can raise error.
File "/usr/local/lib/python3.8/site-packages/ptvsd/_vendored/pydevd/pydevd.py", line 1060, in connect
s = start_client(host, port)
File "/usr/local/lib/python3.8/site-packages/ptvsd/pydevd_hooks.py", line 136, in _start_client
return start_client(daemon, h, p)
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 62, in
start_client=(lambda daemon, h, port: start_daemon()),
File "/usr/local/lib/python3.8/site-packages/ptvsd/_remote.py", line 50, in start_daemon
_, next_session = daemon.start_server(addr=(host, port))
File "/usr/local/lib/python3.8/site-packages/ptvsd/daemon.py", line 161, in start_server
self._server = create_server(addr.host, addr.port)
File "/usr/local/lib/python3.8/site-packages/ptvsd/socket.py", line 79, in create_server
server.bind((host, port))
OSError: [Errno 98] Address already in use
The text was updated successfully, but these errors were encountered: