title: Failed to start the Kernel. OSError: [WinError 123]
body: <p>Since a few days I can't run my code (not even a simple <code>print(&quot;Hello wolrd&quot;)</code>) file  in my python interactive window anymore. When I try to start the kernel I get the following message:</p>
  <blockquote>
  <p>Failed to start the Kernel. OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: '&quot;c:'. View Jupyter log for further details.</p>
  </blockquote>
  <p>I am using python 3.6.13 and running from a virtual env which I am managing with anaconda. I have ipykernel installed. When I do the same with my other python version 3.9.7 it works just fine.</p>
  <p>I already browsed a bunch of threads on this here but couldn't find a solution.</p>
  <p>I am working on a Windows 11 Pro, 64-bit system.</p>
  <p>I uploaded the full output of the jupyter log <a href="https://textuploader.com/ttax8" rel="nofollow noreferrer">here</a> and added as much as I can add to this post below.</p>
  <p>Thankful for any help!!</p>
  <pre><code>warn 9:21:53.633: DataScience Error [o [Error]: The kernel died. Error: Traceback (most recent call last):
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipykernel\kernelapp.py&quot;, line 248, in init_connection_file
      self.connection_file = filefind(self.connection_file, ['.', self.connection_dir])
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipython_genutils\path.py&quot;, line 72, in filefind
      (filename, path_dirs) )
  OSError: File 'c:\\Users\\Ludwig Hagelstein\\AppData\\Roaming\\jupyter\\runtime\\kernel-v2-16516MdNhf67cgpvm.json' does not exist in any of the search paths: ['.', 'C:\\Users\\Ludwig Hagelstein\\AppData\\Roaming\\jupyter\\runtime']
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\runpy.py&quot;, line 193, in _run_module_as_main
      &quot;__main__&quot;, mod_spec)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\runpy.py&quot;, line 85, in _run_code
      exec(code, run_globals)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipykernel_launcher.py&quot;, line 16, in &lt;module&gt;
      app.launch_new_instance()
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\traitlets\config\application.py&quot;, line 663, in launch_instance
      app.initialize(argv)
    File &quot;&lt;decorator-gen-125&gt;&quot;, line 2, in initialize
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\traitlets\config\application.py&quot;, line 87, in catch_config_error
      return method(app, *args, **kwargs)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipykernel\kernelapp.py&quot;, line 572, in initialize
      self.init_connection_file()
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipykernel\kernelapp.py&quot;, line 252, in init_connection_file
      ensure_dir_exists(os.path.dirname(self.abs_connection_file), 0o700)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\site-packages\ipython_genutils\path.py&quot;, line 167, in ensure_dir_exists
      os.makedirs(path, mode=mode)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\os.py&quot;, line 210, in makedirs
      makedirs(head, mode, exist_ok)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\os.py&quot;, line 210, in makedirs
      makedirs(head, mode, exist_ok)
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\os.py&quot;, line 210, in makedirs
      makedirs(head, mode, exist_ok)
    [Previous line repeated 3 more times]
    File &quot;c:\Users\Ludwig Hagelstein\.conda\envs\ERSSA\lib\os.py&quot;, line 220, in makedirs
      mkdir(name, mode)
  OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: '&quot;c:'... View Jupyter [log](command:jupyter.viewOutput) for further details.
    at ChildProcess.&lt;anonymous&gt; (c:\Users\Ludwig Hagelstein\.vscode\extensions\ms-toolsai.jupyter-2022.7.1001951036\out\extension.node.js:2:2345235)
    at ChildProcess.emit (node:events:402:35)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)] {
    category: 'kerneldied',
    kernelConnectionMetadata: {
      kind: 'startUsingPythonInterpreter',
      kernelSpec: {
        specFile: 'c:\\Users\\Ludwig Hagelstein\\.vscode\\extensions\\ms-toolsai.jupyter-2022.7.1001951036\\temp\\jupyter\\kernels\\python3613jvsc74a57bd0a85b755b206659c3403d1cc179901771ab1197b156960f6bf546d22992d48a39\\kernel.json',
        interpreterPath: 'c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\python.exe',
        isRegisteredByVSC: 'registeredByNewVersionOfExt',
        name: 'python3613jvsc74a57bd0a85b755b206659c3403d1cc179901771ab1197b156960f6bf546d22992d48a39',
        argv: [Array],
        language: 'python',
        executable: 'python',
        display_name: &quot;Python 3.6.13 ('ERSSA')&quot;,
        metadata: [Object],
        env: {}
      },
      interpreter: {
        id: 'C:\\USERS\\LUDWIG HAGELSTEIN\\.CONDA\\ENVS\\ERSSA\\PYTHON.EXE',
        sysPrefix: 'C:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA',
        envType: 'Conda',
        envName: 'ERSSA',
        envPath: [w],
        architecture: 3,
        sysVersion: '3.6.13 |Anaconda, Inc.| (default, Mar 16 2021, 11:37:27) [MSC v.1916 64 bit (AMD64)]',
        version: [Object],
        companyDisplayName: 'Anaconda, Inc.',
        displayName: &quot;Python 3.6.13 ('ERSSA')&quot;,
        detailedDisplayName: &quot;Python 3.6.13 ('ERSSA': conda)&quot;,
        uri: [w]
      },
      id: '.jvsc74a57bd0a85b755b206659c3403d1cc179901771ab1197b156960f6bf546d22992d48a39.c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\python.exe.c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\python.exe.-m#ipykernel_launcher'
    },
    exitCode: 1,
    stdErr: 'Traceback (most recent call last):\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipykernel\\kernelapp.py&quot;, line 248, in init_connection_file\r\n' +
      &quot;    self.connection_file = filefind(self.connection_file, ['.', self.connection_dir])\r\n&quot; +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipython_genutils\\path.py&quot;, line 72, in filefind\r\n' +
      '    (filename, path_dirs) )\r\n' +
      &quot;OSError: File 'c:\\\\Users\\\\Ludwig Hagelstein\\\\AppData\\\\Roaming\\\\jupyter\\\\runtime\\\\kernel-v2-16516MdNhf67cgpvm.json' does not exist in any of the search paths: ['.', 'C:\\\\Users\\\\Ludwig Hagelstein\\\\AppData\\\\Roaming\\\\jupyter\\\\runtime']\r\n&quot; +
      '\r\n' +
      'During handling of the above exception, another exception occurred:\r\n' +
      '\r\n' +
      'Traceback (most recent call last):\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\runpy.py&quot;, line 193, in _run_module_as_main\r\n' +
      '    &quot;__main__&quot;, mod_spec)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\runpy.py&quot;, line 85, in _run_code\r\n' +
      '    exec(code, run_globals)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipykernel_launcher.py&quot;, line 16, in &lt;module&gt;\r\n' +
      '    app.launch_new_instance()\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\traitlets\\config\\application.py&quot;, line 663, in launch_instance\r\n' +
      '    app.initialize(argv)\r\n' +
      '  File &quot;&lt;decorator-gen-125&gt;&quot;, line 2, in initialize\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\traitlets\\config\\application.py&quot;, line 87, in catch_config_error\r\n' +
      '    return method(app, *args, **kwargs)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipykernel\\kernelapp.py&quot;, line 572, in initialize\r\n' +
      '    self.init_connection_file()\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipykernel\\kernelapp.py&quot;, line 252, in init_connection_file\r\n' +
      '    ensure_dir_exists(os.path.dirname(self.abs_connection_file), 0o700)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\site-packages\\ipython_genutils\\path.py&quot;, line 167, in ensure_dir_exists\r\n' +
      '    os.makedirs(path, mode=mode)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\os.py&quot;, line 210, in makedirs\r\n' +
      '    makedirs(head, mode, exist_ok)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\os.py&quot;, line 210, in makedirs\r\n' +
      '    makedirs(head, mode, exist_ok)\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\os.py&quot;, line 210, in makedirs\r\n' +
      '    makedirs(head, mode, exist_ok)\r\n' +
      '  [Previous line repeated 3 more times]\r\n' +
      '  File &quot;c:\\Users\\Ludwig Hagelstein\\.conda\\envs\\ERSSA\\lib\\os.py&quot;, line 220, in makedirs\r\n' +
      '    mkdir(name, mode)\r\n' +
      `OSError: [WinError 123] Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch: '&quot;c:'\r\n`
  }
  info 9:21:53.702: Process Execution: &gt; ~\.conda\envs\ERSSA\python.exe -c &quot;import ipykernel&quot;
  &gt; ~\.conda\envs\ERSSA\python.exe -c &quot;import ipykernel&quot;
  </code></pre>