First time here? Check out the FAQ!

Revision history  [back]

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?

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()

    wingdbstub.Ensure()

    (I did not mange to display the code above in a "preformatted" block, sorry!)

  • 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 wingdbstub.Ensure()

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

ValueError: Not connected

connected


(again, the block above does not appear in block-form; how can I change that??)

  • This error message disappears when I manually:

    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?

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 did not mange to display the code above in a "preformatted" block, sorry!)

  • 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 1 import wingdbstub ----> 2 wingdbstub.Ensure()

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

ValueError: Not connected


(again, the block above does not appear in block-form; how can I change that??)

  • 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?