I am connected to a remote server via the Remote - SSH extension on VSCode. When I am using an ipynb jupyter notebook file, and I try to Debug Cell the following simple cell,
from multiprocessing import Pool
pool = Pool(4)
I get the following error popup:
Invalid message: Session is already initialized
and simultaneously, a few of these messages on the bottom right of the VSCode window:
Failed to launch debugger for child process 16803
I believe this error is due to not being able to attach the debugger to the child processes, but I havent been able to resolve the issue. I tried setting "subProcess": true, in my launch.json, but that did not resolve anything. This error does not occur if I debug using 'Run and Debug' section of VSCode, nor does it happen if I use the pseudo notebook feature within .py files using #%% to create cells. It only happens in actual .ipynb files when debugging a cell.
Any suggestions are appreciated!
Related
I remember I was able to reconnect to an existing Jupyter notebook session in VS code before by changing the kernel for a notebook. Now the option to reconnect to an existing session is gone, see:
How do I reconnect to an existing Jupyter notebook session in VS code?
To be clear, the sessions were never shut down. In fact, I can still see them running in the Running tab of my browser version of jupyter notebook, although clicking on them results in a 404 error:
The jupyter kernel is running on a remote server. I use a SSH session to connect back to it when I work.
Current versions: VS code is v1.68.1 and the Jupyter extension on remote machine is v2022.5.1001601848, if that helps.
If you would like to connect to an existing jupyter server can you do so by going into the command Jupyter: Specify Jupyter Server for Connections and selecting the appropriate remote server from the list. If the required server is not on that list, then you can select it.
I'am trying to open Jupyter Notebook from Putty. I have a server where is installed Python and Jupyter. I followed all the steps from this post Remote access Jupyter notebook from Windows but it doesn't work. I got the error: This site can't be reached.
Any idea?
Thx
edit: I added a photo with the ps from putty and the error from browser. It's said:
This site can't be reached
.
The good old logout/reboot mechanisms work in this case too!
You can try closing the jupyter connection in the tunnel's connection, logout from the remote server, re-connect and try. Has worked a few times for me today.
If that doesn't work, there might be stale jupyter notebook processes on the remote server. Query for them and kill them and then logout-log back in and try.
If that still does not work, try implementing your code through ipython to check if Jupyter is working at all, even if its user interface isn't loading on your browser.
I'm editing code that is stored on a shared company linux server using VS code on my Windows machine through a remote SSH client. When editing python code natively on Windows, the debugger seems like it is automatically set up once the interpreter is chosen. I'd like to use the same debugger on my remote client code, but I cannot get it to run properly. I have the interpreter pointing to the correct installation on the server as well as the proper hash-bang at the beginning of my program, but I get this error in the terminal:
ImportError: libffi.so.7: cannot open shared object file: No such file or directory
as well as a popup error saying "Timed out waiting for launcher to connect" with the option to open the launch.json file. I'm not sure what parameters I should adjust in the launch.json file if any.
I am running a jupyter noteboook on AWS EC2 via
nohup jupyter notebook
Unfortunately my notebook went off, but when I reopen it, the notebook says:
kernel connected
I have a few print() commands in the script to see how the program is progressing. However th se has stopped (is by design of the jupyter notebook and cannot be changed yet). However, I wonder is there a way to check the progress of my program now? is it even still running giving me an output?
I have assigned the results to a variable and also at the end of long-running loop a command to export to csv...
I start up Jupyter Notebook from the cmd and it works with no issues. But when I open the localhost, no folders are shown and it just says Server error: error. When I refresh, the folders show up, but immediately after Firefox tells me the script is unresponsive. After a few seconds, the entire browser crashes. What is happening, and is there any way I can fix this?