18

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?

Gino Sesia
  • 383
  • 2
  • 4
  • 14
  • Could you please provide the picture of the error. It should be helpful if we can know the stack of the problem and where prompt it. – Steven-MSFT Jul 06 '21 at 05:40

3 Answers3

2

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.

WurzelseppQX
  • 520
  • 1
  • 6
  • 17
2

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

Henrik
  • 673
  • 8
  • 18
0

Exit the VS Code and reopen it.

It worked for me!

X 47 48 - IR
  • 1,250
  • 1
  • 15
  • 28