Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data Viewer is blank when using Bluloco theme #2517

Closed
vishwa-raj opened this issue Dec 20, 2019 · 5 comments
Closed

Data Viewer is blank when using Bluloco theme #2517

vishwa-raj opened this issue Dec 20, 2019 · 5 comments
Assignees

Comments

@vishwa-raj
Copy link

Bug: Notebook Editor, Interactive Window, Editor cells

Steps to cause the bug to occur

  1. Install Bluloco theme (dark or light)
  2. Create a blank Jupyter notebook with the Python extension.
  3. Create a list variable (or a numpy array, pandas series, etc..)
  4. Open variable explorer
  5. Open the data viewer for variable created in step 3.

Actual behavior

The data viewer is blank

Expected behavior

The data should be visible in the data viewer

Your Jupyter and/or Python environment

Please provide as much info as you readily know

  • Jupyter server running: Local
  • Extension version: 2019.11.50794
  • VS Code version: 1.41.1
  • Setting python.jediEnabled: tried both true and false
  • Python: 3.6.9
  • OS: Windows
  • Virtual environment: conda

Developer Tools Console Output

[Extension Host] Info Python Extension: 2019-12-20 22:15:28: Using colors to generate CSS ...
console.ts:137 [Extension Host] Error Python Extension: 2019-12-20 22:15:28: [TypeError: e.tokenColors.forEach is not a function at y.generateMonacoThemeObject (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:613378) at y.applyThemeData (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:611834) at async C.handleMonacoThemeRequest (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:1:429083)]
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:581
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:581
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
console.ts:137 [Extension Host] Info Python Extension: 2019-12-20 22:15:28: Using colors to generate CSS ...
console.ts:137 [Extension Host] Error Python Extension: 2019-12-20 22:15:28: [TypeError: e.findIndex is not a function at y.matchTokenColor (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:612192) at y.getScopeStyle (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:608805) at y.generateCss (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:612411) at y.applyThemeData (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:75:611834) at async C.handleCssRequest (c:\Users\pc.vscode\extensions\ms-python.python-2019.11.50794\out\client\extension.js:1:428767)]
t.log @ console.ts:137
$logExtensionHostMessage @ mainThreadConsole.ts:39
_doInvokeHandler @ rpcProtocol.ts:398
_invokeHandler @ rpcProtocol.ts:383
_receiveRequest @ rpcProtocol.ts:299
_receiveOneMessage @ rpcProtocol.ts:226
(anonymous) @ rpcProtocol.ts:101
fire @ event.ts:581
fire @ ipc.net.ts:453
_receiveMessage @ ipc.net.ts:733
(anonymous) @ ipc.net.ts:592
fire @ event.ts:581
acceptChunk @ ipc.net.ts:239
(anonymous) @ ipc.net.ts:200
t @ ipc.net.ts:28
emit @ events.js:200
addChunk @ _stream_readable.js:294
readableAddChunk @ _stream_readable.js:275
Readable.push @ _stream_readable.js:210
onStreamRead @ internal/stream_base_commons.js:166
webviewElement.ts:241 [Embedded Page] Uncaught (in promise) Error: Illegal theme base!

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer

@rchiodo
Copy link
Contributor

rchiodo commented Dec 20, 2019

Thanks for the bug. Seems this theme is using another layer of indirection for token colors.

We need to fix this line here:
https://github.com/microsoft/vscode-python/blob/bb158391441f54a5284eaf593f87c547fde745a8/src/client/datascience/codeCssGenerator.ts#L337
It is assuming tokenColors is an array, when it can also be a file.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 20, 2019

A crash here prevents the theme from being loaded, and prevents the viewer from opening.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 20, 2019

So we should also harden the theme parsing to at least return the default on a theme crash.

@joshuajaharwood
Copy link

Bug also occurs with the Ariake Dark 0.2.2 in VS Code 1.41.1.

@DavidKutu DavidKutu self-assigned this Feb 11, 2020
@rchiodo
Copy link
Contributor

rchiodo commented Feb 27, 2020

Validated

@rchiodo rchiodo closed this as completed Feb 27, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Mar 10, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants