question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Markdown cell not rendering in python interactive window if no internet connection

See original GitHub issue

Environment data

VS Code Version: 1.37.0-insider Extension Version: 2019.6.242221 OS - Windows 10 17763.615. Using remote development 0.15.0 to run code on a linux box Python 3.6.8 64-bit with anaconda (conda env)

Expected behaviour

When I run a markdown code block, it should display the text as markdown in the python interactive viewer.

Actual behaviour

A blank cell loads with no output. Regular python code blocks run as expected. Markdown just comes up blank.

Steps to reproduce:

  1. Create a new file “test.py”
  2. Code block
#%% [markdown]
# Test Print
# This should print out
# ## This should print as a heading

#%%
print("Test")

Logs

Output for Python in the Output panel:

Starting Microsoft Python language server.
Starting Jedi Python language engine.

Output from Console:

workbench.main.js:242 [Extension Host] Info Python Extension: 2019-08-05 11:31:02: Submitting code for 364114ed-361f-4257-8d33-a094d695fea0
workbench.main.js:242 [Extension Host] Info Python Extension: 2019-08-05 11:31:02: Waiting for jupyter server and web panel ...
2
workbench.main.js:242 [Extension Host] Info Python Extension: 2019-08-05 11:31:02: Wait for sys info for 364114ed-361f-4257-8d33-a094d695fea0 0
workbench.main.js:242 [Extension Host] Info Python Extension: 2019-08-05 11:31:02: Finished execution for 62bff78a-274a-4fd2-b722-08b5935188d9
workbench.main.js:242 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot read property 'version' of undefined
workbench.main.js:242 [Extension Host] stack trace: TypeError: Cannot read property 'version' of undefined
	at f.getLanguageServerFolderName (/home/rlevitin/.vscode-server-insiders/extensions/ms-python.python-2019.6.24221/out/client/extension.js:75:111924)
	at process._tickCallback (internal/process/next_tick.js:68:7)
workbench.main.js:3414 [[object Object]]Cannot read property 'version' of undefined
workbench.main.js:3414 TypeError: Cannot read property 'version' of undefined
	at f.getLanguageServerFolderName (/home/rlevitin/.vsco…ent/extension.js:75)
	at process._tickCallback (internal/process/next_tick.js:68)
workbench.main.js:3038 [Embedded Page] Uncaught ReferenceError: MathJax is not defined
workbench.main.js:242 [Extension Host] rejected promise not handled within 1 second: TypeError: Cannot read property 'version' of undefined
workbench.main.js:242 [Extension Host] stack trace: TypeError: Cannot read property 'version' of undefined
	at f.getLanguageServerFolderName (/home/rlevitin/.vscode-server-insiders/extensions/ms-python.python-2019.6.24221/out/client/extension.js:75:111924)
	at process._tickCallback (internal/process/next_tick.js:68:7)
workbench.main.js:3414 [[object Object]]Cannot read property 'version' of undefined
workbench.main.js:3414 TypeError: Cannot read property 'version' of undefined
	at f.getLanguageServerFolderName (/home/rlevitin/.vsco…ent/extension.js:75)
	at process._tickCallback (internal/process/next_tick.js:68)
workbench.main.js:242 [Extension Host] ApplicationInsights:Sender 
Array(2)
DevTools failed to parse SourceMap: https://ticino.blob.core.windows.net/sourcemaps/92da68a…/core/vs/workbench/workbench.main.js.map

image

I have looked at Issue microsoft/vscode-python#3108. The output looks to be a similar problem but my machine is not offline… not sure why this is happening. It was working fine last week.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
joyceerhlcommented, Aug 31, 2021

Closing as VS Code ships KaTeX for markdown math rendering and doesn’t rely on downloading MathJax. The new native interactive window relies on VS Code for markdown rendering. Please file a bug at https://github.com/microsoft/vscode if something isn’t working.

1reaction
rchiodocommented, Feb 14, 2020

@SheepDomination in order to have code that doesn’t give you a linter error, you need to put a space between the # and the %%[markdown].

Like so:

image

First cell has an error, second doesn’t. We changed our default comment to have a space now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Markdown cell not rendering in python interactive window if no ...
When I run a markdown code block, it should display the text as markdown in the python interactive viewer. Actual behaviour. A blank...
Read more >
Working with Jupyter code cells in the Python Interactive window
Connect to a remote Jupyter server · Run the Jupyter: Specify local or remote Jupyter server for connections command from the Command Palette...
Read more >
Show Markdown from within Code Cells in Jupyter and VS ...
This workaround will let us display markdown from within code cells in IPython output, while ignoring it when run in normal Python (like...
Read more >
Cannot open jupyter notebook in VSCode - Stack Overflow
I understand that the Jupyter extension is not maintained. I just use the python extension now. I received this info ...
Read more >
The Ultimate Markdown Guide (for Jupyter Notebook) - Medium
You may have heard the above proverb, but if not, then well, ... Markdown Cells allows you to write and render Markdown syntax....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found