Wing9 cannot connect to JupyterLab with wingdbstub

While I can attach Wing manually(!) to a running JupyterLab process, I cannot do so automatically.

In Wing

  • I have ticked "Accept Debug Connections"
  • I have ensured that in wingdbstub.py the location of WINGHOME is correct (I have used the default parameters during installation, so I did not have to modify anything).

In JupyterLab

I have entered the following code into the first cell

import wingdbstub
wingdbstub.Ensure()

I can see the file wingdbstub.py

But when I try to run the first cell, I get the error message

ValueError                                
Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_25564\2209246843.py in <module>
      1 import wingdbstub
----> 2 wingdbstub.Ensure()

~\CloudStation\Teaching\CSS\Coding\CSS_ipynb\wingdbstub.py in Ensure(require_connection, require_debugger)
    357 
    358   if require_connection and debugger.ChannelClosed():
--> 359     raise ValueError('Not connected')
    360 

ValueError: Not connected

This error message disappears when I manually:

  • Go to Wing
  • Select "Attach to Process", and manually select the running process
  • go back to JupyterLab, and re-run the first cell.

How can I avoid this error?

Thomas Haslwanter's avatar
21
Thomas Haslwanter
asked 2023-03-10 09:09:37 -0500
Wingware Support's avatar
4.1k
Wingware Support
updated 2023-03-10 09:22:56 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Could you please enable debugger-side diagnostics by setting kLogFile inside your copy of wingdbstub.py and then send the output to support@wingware.com?

Wingware Support's avatar Wingware Support (2023-03-10 10:01:58 -0500) edit
add a comment see more comments