DonJayamanne / vscodeJupyter

Jupyter for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=donjayamanne.jupyter
MIT License
335 stars 34 forks source link

Support for ipywidgets? #56

Open iliyang opened 7 years ago

iliyang commented 7 years ago

Environment data

VS Code version: 1.13.1 Jupyter Extension version: 1.13 OS and version: macOS Sierra 10.12.5

Logs

Output from Jupyter output panel

Widget Javascript not detected.  It may not be installed or enabled properly.

Output from Console window (Help->Developer Tools menu)

Object 'jupyter.widget' not found in registry: Error: Object 'jupyter.widget' not found in registry
    at /Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/@jupyterlab/services/lib/utils.js:234:24
    at Object.loadObject (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/@jupyterlab/services/lib/utils.js:213:12)
    at DefaultKernel._handleCommOpen (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/@jupyterlab/services/lib/kernel/default.js:792:29)
    at DefaultKernel._onWSMessage (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/@jupyterlab/services/lib/kernel/default.js:691:26)
    at WebSocket._ws.onmessage (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/@jupyterlab/services/lib/kernel/default.js:634:53)
    at WebSocket.onMessage (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/ws/lib/EventTarget.js:103:16)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:191:7)
    at Receiver._receiver.onmessage (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/ws/lib/WebSocket.js:146:54)
    at Receiver.dataMessage (/Users/myusername/.vscode/extensions/donjayamanne.jupyter-1.1.3/node_modules/ws/lib/Receiver.js:389:14)
e.onUnexpectedError @ shell.ts:445
(anonymous) @ shell.ts:405
e.onUnexpectedError @ errors.ts:68
o @ errors.ts:88
t.onUnexpectedExtHostError @ mainThreadErrors.ts:13
e.handle @ abstractThreadService.ts:34
s @ ipcRemoteCom.ts:275
f @ ipcRemoteCom.ts:231
_combinedTickCallback @ internal/process/next_tick.js:67
_tickCallback @ internal/process/next_tick.js:98

Actual behavior

Want to use ipywidgets to show dynamic content., but sadly it doesn't work...

Expected behavior

In a Jupyter note book the code works.

Steps to reproduce:

Run the following cell inside VSCode and Jupyter:

#%%
import ipywidgets
ipywidgets.HTML(value="Hello <b>World</b>")