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

Yellow line highlighting in jupyter notebook unreadable in default dark themes #8697

Closed
1 of 2 tasks
YSaxon opened this issue Jan 13, 2022 · 8 comments · Fixed by #8705
Closed
1 of 2 tasks

Yellow line highlighting in jupyter notebook unreadable in default dark themes #8697

YSaxon opened this issue Jan 13, 2022 · 8 comments · Fixed by #8705
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@YSaxon
Copy link

YSaxon commented Jan 13, 2022

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I'm not positive if this is primarily a bug in vscode or something else, but after updating vscode (as well as upgrading a few packages in pip), the yellow highlighted lines in python error tracebacks in jupyter notebooks have become essentially unreadable in the default dark themes...

Screen Shot 2022-01-13 at 4 33 39 PM

...and better-but-not-great even in the light themes (though I have always used the dark theme before, so I can't say if the light theme here is better, worse, or same than it was previously)
Screen Shot 2022-01-13 at 4 50 25 PM

VS Code Version

Version: 1.63.2 Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:37:28.172Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Darwin x64 20.6.0

Jupyter Extension Version

v2021.11.1001550889

Jupyter logs

Jupyter Extension Version: 2021.11.1001550889.
Python Extension Verison: 2021.12.1559732655.
Info 16:43:46: Experimentation service retrieved: [object Object]
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 16:43:46: ZMQ install verified.
Info 16:43:46: Pre-warming kernel daemon for [redacted]
Info 16:43:48: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 16:43:49: Creating controller for jupyter-notebook with interpreter ~/.pyenv/shims/python3
Info 16:43:51: Freferred kernel connection found in cache .jvsc74a57bd08d3bee82523df57872750accfd1cec38af9ec179d4291b45fb1cca0911ed8e96./Users/ysaxon/.pyenv/shims/python3./Users/ysaxon/.pyenv/shims/python3.-m#ipykernel_launcher
Info 16:43:51: PreferredConnection: .jvsc74a57bd08d3bee82523df57872750accfd1cec38af9ec179d4291b45fb1cca0911ed8e96./Users/ysaxon/.pyenv/shims/python3./Users/ysaxon/.pyenv/shims/python3.-m#ipykernel_launcher found for NotebookDocument: untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:51: TargetController found ID: .jvsc74a57bd08d3bee82523df57872750accfd1cec38af9ec179d4291b45fb1cca0911ed8e96./Users/ysaxon/.pyenv/shims/python3./Users/ysaxon/.pyenv/shims/python3.-m#ipykernel_launcher for document untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:51: Setting controller affinity for untitled:Untitled-1.ipynb?jupyter-notebook .jvsc74a57bd08d3bee82523df57872750accfd1cec38af9ec179d4291b45fb1cca0911ed8e96./Users/ysaxon/.pyenv/shims/python3./Users/ysaxon/.pyenv/shims/python3.-m#ipykernel_launcher
Info 16:43:51: Process Execution: > ~/.pyenv/shims/python3 -m pip list
> ~/.pyenv/shims/python3 -m pip list
Info 16:43:51: Process Execution: > ~/.pyenv/shims/python3 -c "import ipykernel"
> ~/.pyenv/shims/python3 -c "import ipykernel"
Info 16:43:52: Registering dummy command feature
Warn 16:43:54: Got env variables but with errors, stdErr:pyenv: activate: command not found
, stdOut: e8b39361-0157-4923-80e1-22d70d46dee6
{"PYENV_ROOT": "/Users/ysaxon/.pyenv", "SHELL": "/bin/zsh", "CLICOLOR": "1", "TMPDIR": "/var/folders/l5/hz74y6ps3x1gktbp6wq4kng80000gn/T/", "PYTHONUNBUFFERED": "1", "ORIGINAL_XDG_CURRENT_DESKTOP": "undefined", "HOMEBREW_AUTO_UPDATE_SECS": "36000", "PYENV_VERSION": "3.9.1", "USER": "ysaxon", "PYTHONIOENCODING": "utf-8", "LS_COLORS": "di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43", "COMMAND_MODE": "unix2003", "VSCODE_VERBOSE_LOGGING": "true", "PYTHONWARNINGS": "ignore", [redacted], "PYENV_DIR": "/", "__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0", "VSCODE_PIPE_LOGGING": "true", "VSCODE_LOG_STACK": "false", "ELECTRON_RUN_AS_NODE": "1", "VSCODE_AMD_ENTRYPOINT": "vs/workbench/services/extensions/node/extensionHostProcess", "LSCOLORS": "Gxfxcxdxbxegedabagacad", "PATH":[redacted], "__CFBundleIdentifier": "com.microsoft.VSCode", "PWD": "/", "DOTNET_ROOT": "/usr/local/opt/dotnet/libexec", "VSCODE_HANDLES_UNCAUGHT_ERRORS": "true", "PYENV_HOOK_PATH": "/Users/ysaxon/.pyenv/pyenv.d:/usr/local/Cellar/pyenv/2.2.2/pyenv.d:/usr/local/etc/pyenv.d:/etc/pyenv.d:/usr/lib/pyenv/hooks", "XPC_FLAGS": "0x0", "VSCODE_LOG_NATIVE": "false", "XPC_SERVICE_NAME": "0", "HOME": "/Users/ysaxon", "SHLVL": "1", "PYENV_SHELL": "zsh", "APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true", "VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}", [redacted], "LOGNAME": "ysaxon", "VSCODE_CODE_CACHE_PATH": "/Users/ysaxon/Library/Application Support/Code/CachedData/899d46d82c4c95423fb7e10e68eba52050e30ba3", "VSCODE_IPC_HOOK": "/Users/ysaxon/Library/Application Support/Code/1.63.2-main.sock", "VSCODE_PID": "49288", [redacted], "DISPLAY": "/private/tmp/com.apple.launchd.KosoosRCV0/org.xquartz:0", "VSCODE_CWD": "/", "LC_CTYPE": "UTF-8"}

Info 16:43:54: Creating daemon process for ~/.pyenv/shims/python3 with env variables count 44
Info 16:43:54: Process Execution: > ~/.pyenv/shims/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/.pyenv/shims/python3 -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 16:43:54: Setting setActiveController for untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:54: KernelProvider switched kernel to id = .jvsc74a57bd0d56f012628c4bdae5b36dd163bc1bea99a0fa96644464dcc722a7d645b866801./Users/ysaxon/.pyenv/versions/3.9.1/python./Users/ysaxon/.pyenv/versions/3.9.1/python.-m#ipykernel_launcher
Info 16:43:54: Starting Notebook in kernel.ts id = .jvsc74a57bd0d56f012628c4bdae5b36dd163bc1bea99a0fa96644464dcc722a7d645b866801./Users/ysaxon/.pyenv/versions/3.9.1/python./Users/ysaxon/.pyenv/versions/3.9.1/python.-m#ipykernel_launcher
Info 16:43:54: Creating raw notebook for untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:54: Getting preferred kernel for untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:54: Computing working directory untitled:Untitled-1.ipynb?jupyter-notebook
Info 16:43:54: Starting raw kernel 3.9.1 (Python 3.9.1)
Info 16:43:54: installMissingDependencies ~/.pyenv/versions/3.9.1/bin/python
Info 16:43:54: IPykernel found previously in this enviornment ~/.pyenv/versions/3.9.1/bin/python
Info 16:43:54: Kernel launching with ports 9000,9001,9002,9003,9004. Start port is 9000
Info 16:43:54: Launching kernel daemon for Python 3.9.1 64-bit ('3.9.1': pyenv) # ~/.pyenv/versions/3.9.1/bin/python
Info 16:43:54: No custom variables for Kernel as interpreter is not conda, but is Pyenv
Info 16:44:00: Process Execution: > ~/.pyenv/versions/3.9.1/bin/python -m pip list
> ~/.pyenv/versions/3.9.1/bin/python -m pip list
Info 16:44:00: Creating daemon process for ~/.pyenv/versions/3.9.1/bin/python with env variables count 0
Info 16:44:00: Process Execution: > ~/.pyenv/versions/3.9.1/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
> ~/.pyenv/versions/3.9.1/bin/python -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.kernel_launcher_daemon -v
Info 16:44:01: Starting kernel from scratch
Warn 16:44:08: StdErr from Kernel Process /Users/ysaxon/.pyenv/versions/3.9.1/lib/python3.9/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.

Warn 16:44:08: StdErr from Kernel Process   warn(

Warn 16:44:08: StdErr from Kernel Process /Users/ysaxon/.pyenv/versions/3.9.1/lib/python3.9/site-packages/traitlets/traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'e0b76c2c-a262-4384-a16c-6b6db6ef909b' instead of 'b"e0b76c2c-a262-4384-a16c-6b6db6ef909b"'.

Warn 16:44:08: StdErr from Kernel Process   warn(

Warn 16:44:08: Didn't get response for requestKernelInfo after 23ms.
Info 16:44:08: Raw session started and connected
Started kernel 3.9.1 (Python 3.9.1)
Info 16:44:08: Finished connecting 5f25f0b4-34bb-4ecf-8ea8-f716d1d0f2dd
Info 16:44:08: UpdateWorkingDirectoryAndPath in Kernel
Info 16:44:08: Executing (status unknown) silently Code = %config Completer.use_jedi = False
Info 16:44:08: Executing silently Code (completed) = %config Completer.use_jedi = False
Info 16:44:08: Executing (status idle) silently Code = %config InlineBackend.figure_formats = ['png']
Info 16:44:08: Executing silently Code (completed) = %config InlineBackend.figure_formats = ['png']
Info 16:44:08: Executing (status idle) silently Code = import sys\nprint(sys.executable)
Info 16:44:08: Executing silently Code (completed) = import sys\nprint(sys.executable)
Info 16:44:08: Waiting for idle on (kernel): f150c805-0f4e-41c7-b5e7-2ecc37d9ec3e -> idle
Info 16:44:08: Finished waiting for idle on (kernel): f150c805-0f4e-41c7-b5e7-2ecc37d9ec3e -> idle
Info 16:44:08: IPyWidgetScriptSource.initialize
Info 16:44:10: Registering dummy command feature

Coding Language and Runtime Version

Python 3.9.1

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@YSaxon YSaxon added bug Issue identified by VS Code Team member as probable bug needs-triage labels Jan 13, 2022
@IanMatthewHuff
Copy link
Member

If you just updated to IPython8 I believe this is the same root cause as this issue here:
#8675

@rchiodo This is the same traceback issue, right?

@rchiodo
Copy link
Contributor

rchiodo commented Jan 13, 2022

Similar. Didn't realize we needed to remove the extra colors that IPython added too.

@rchiodo
Copy link
Contributor

rchiodo commented Jan 13, 2022

This problem would show up in notebooks (not just interactive as #8675 is)

@rchiodo
Copy link
Contributor

rchiodo commented Jan 14, 2022

Hopefully this one can be fixed by remapping the color to a vs code terminal color.

@YSaxon
Copy link
Author

YSaxon commented Jan 14, 2022 via email

@rchiodo
Copy link
Contributor

rchiodo commented Jan 14, 2022

I'm just going to fix this at the same time as #8675. We can't handle background colors so just going to remove them from the tracebacks.

@rchiodo rchiodo added this to the January 2022 milestone Jan 26, 2022
@DonJayamanne DonJayamanne added the verified Verification succeeded label Jan 27, 2022
@antonioalegria
Copy link

I still seem to have this problem and I'm using all the latest versions as of September 23rd -- do I need to change some configuration?

@rchiodo
Copy link
Contributor

rchiodo commented Sep 23, 2022

The root cause of this problem before was IPython adding ascii color tokens to the output. You could check your IPython version, perhaps they've added new colors since we addressed this. Your best bet would be to open a new issue though.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants