Home > Software engineering >  OSError [WinError 123] when using Jupyter within VS Code
OSError [WinError 123] when using Jupyter within VS Code

Time:07-25

I have used the Jupyter widget # %% within VS code all the time with no issue. Recently, I've gotten the error message

Failed to start the Kernel. 
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '"c:'. 
View Jupyter log for further details.

However, Jupyter notebook is running fine in Browser.

I have not defined any paths in my code and when I've created the virtual environment Jupyter was running fine within VS code.

Has someone experienced the same issue before and find where the problem lies? Thanks!

CodePudding user response:

Solution to the problem

Usually WinError 123 is thrown when there is a usage of ":" Now this is not something you did, so I am assuming this comes from the extension you've used in Jupyter.

Now all I can suggest is this Re-installing the VSCode extension used for Jupyter and then reloading VSCode.

Disclaimer

If you've used "C:" in any of your open statements, you need to add make the string like this

_str = r"c:\\helloworld\dummy.file"

Hope that resolves your problem

CodePudding user response:

I think your problem is the same as this issue.

The correct call is the following code:

path = r"C:"

If the problem cannot be solved, please paste part of your code.

  • Related