Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode fails to run python with this error: Error: Session cannot generate requests

I am trying to run python in vscode and it has been working for a few hours but it suddenly stopped running and now whenever i run it i get this error:

Error: Session cannot generate requests at w.executeCodeCell

I am connecting to a garmin account where i pull the sleeping data and trying to plot it on a graph which worked but now it has stopped working and giving me the above error.

How would i fix this?

like image 865
Gino Sesia Avatar asked Jul 05 '21 16:07

Gino Sesia


2 Answers

Try to restart the Kernel.

Everytime I am facing this issue myself, it was because the kernel was loosing the connection and had to be restarted.

like image 102
WurzelseppQX Avatar answered Oct 18 '22 23:10

WurzelseppQX


You might get this error because your script has run exit(). Remove that and rerun, and you should be fine.

like image 34
Henrik Avatar answered Oct 18 '22 21:10

Henrik