title: Error: Kernel is dead, VSCode Jupyter, loop: open files, read
body: <p>I have a simple loop that should open and keep txt files kept in <code>myfiles</code>. The <code>myfiles</code> list is around 5000+ long.</p>
  <pre><code>emptylist = []
  for i in myfiles:
      with open(i) as f:
          lines = f.read().splitlines()
          emptylist.append(lines)
  </code></pre>
  <p>I'm able to run this for smaller amounts of <code>mylist</code> but not for all.</p>
  <p>I get the</p>
  <pre><code>Error: Kernel is dead
  Error: Kernel is dead 
  at g._sendKernelShellControl (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1006195)
  at g.sendShellMessage (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1005964)
  at g.requestExecute (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:1008506)
  at d.requestExecute (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:37:325680)
  at w.requestExecute (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:32:18027)
  at w.executeCodeCell (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:301076)
  at w.execute (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:300703)
  at w.start (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:296367)
  at runMicrotasks (&lt;anonymous&gt;)
  at processTicksAndRejections (internal/process/task_queues.js:93:5)
  at async t.CellExecutionQueue.executeQueuedCells (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:311160)
  at async t.CellExecutionQueue.start (/home/hjh/.vscode/extensions/ms-toolsai.jupyter-2021.8.2041215044/out/client/extension.js:52:310700)
  
  </code></pre>
  <p>I tried</p>
  <pre><code>conda install ipykernel --update-deps
  </code></pre>
  <p>but it didn't help.</p>
  <p>I even tried <code>time.sleep(0.1)</code> but unsuccessful.</p>