1

I am just a beginner :)
Can any one help me out??

When I click the plus sign to create a new cell in a workbook I get an error. The new cell isn't created and I see this error message in a larger than usual font.

The error message survives a restart of the kernel.

The error is gone after I restart VSCode.

The error is also gone after I save / close the file and re-open it.

code

System.out.print("hello jshell");

and then i hit alt + enter

output

hello jshell

TypeError: Cannot read property 'charAt' of undefined at 

in t
in div
in t
in div
in t
in div
in t
in div
in div
in div
in div
in div
in div
in t
in h
in t
in div
in div
in div
in t
in main
in div
in t
in h
in f

I am using

  • VS-code version : 1.51.1
  • jupyter core : 4.6.3
  • jupyter-notebook : 6.1.5
  • qtconsole : 4.7.7
  • ipython : 7.18.1
  • ipykernel : 5.3.4
  • jupyter client : 6.1.7
  • jshell : 15.0.1

out put screen shot

Arien
  • 11
  • 3
  • where's the `in t in div in t in div` from? can you post all code. when you open a new jupyter notebook and code in it ,does this error show again? – Molly Wang-MSFT Nov 25 '20 at 03:21
  • @MollyWang yes its the error is same even in new notebook.(only if done with ijava and vscode) **in t in div in t in div f** appeared instead of new cell, in place of new cell – Arien Nov 25 '20 at 09:27
  • I reproduced your issue and i'm finding solutions. – Molly Wang-MSFT Nov 26 '20 at 07:55

1 Answers1

1

I've added the java to Jupyter Kernel and with many tests conducted, it's an issue in VS Code:

Error in VS Code

There're many similar issues posted in GitHub and now, this function is solved in VS Code Insiders but still not in VS Code:

Run well in VS Code Insiders

You can install VS Code Insider, but it may not that stable, after all it's the beta-version of VS Code. In another way, you can turn to JupyterLab, try it in browser or install it.

enter image description here

Molly Wang-MSFT
  • 7,943
  • 2
  • 9
  • 22