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

Weird rare html rendering bug in jupyter notebook #16398

Open
1 of 2 tasks
Butanium opened this issue Jan 22, 2025 · 0 comments
Open
1 of 2 tasks

Weird rare html rendering bug in jupyter notebook #16398

Butanium opened this issue Jan 22, 2025 · 0 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@Butanium
Copy link

Butanium commented Jan 22, 2025

Applies To

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

What happened?

When I try to load this test.html (had to change extension to txt for github) in my notebook it will sometimes fail to render it properly:

from IPython.display import HTML, IFrame
with open("test.html", "r") as f:
    display(HTML(f.read()))

Image

and sometimes succeed:

Image

while opening the html in my browser always work

From my experience it seems to be correlated with having a big notebook, with a lot of outputs. Clearing all outputs fixed it once, reloading fixed it once but not the second times, clearing the output of the cell does not fix it usually.

VS Code Version

Version: 0.44.11 VSCode Version: 1.93.1 Commit: fe574d0820377383143b2ea26aa6ae28b3425220 Date: 2025-01-03T07:59:06.361Z Electron: 30.5.1 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.26100

Jupyter Extension Version

v2024.8.1

Jupyter logs

Example of logs where mwe was a single cell with the code above and worked correctly, while demo which contains bunch of other cells didn't.

ursor (1.93.1, undefined, desktop)
Jupyter Extension Version: 2024.8.1.
Python Extension Version: 2024.5.1.
Pylance Extension not installed.
Platform: win32 (x64).
Temp Storage folder ~\AppData\Roaming\Cursor\User\globalStorage\ms-toolsai.jupyter\version-2024.8.1
Workspace folder ~\Documents\repos\tiny-activation-dashboard, Home = c:\Users\dumas
03:55:41.954 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.8) for '~\Documents\repos\tiny-activation-dashboard\mwe.ipynb' (disableUI=true)
03:55:48.416 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 6467ms
03:55:48.465 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
03:55:48.510 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 4294ms
03:55:48.576 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m pip list
03:55:48.588 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
03:55:48.598 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.cursor\extensions\ms-toolsai.jupyter-2024.8.1-universal\pythonFiles\vscode_datascience_helpers\kernel_interrupt_daemon.py --ppid 22404
    > cwd: ~\.cursor\extensions\ms-toolsai.jupyter-2024.8.1-universal\pythonFiles\vscode_datascience_helpers
03:55:48.871 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3453bdf109124f84fb39adb1b5cdb57c923d903d0.json
    > cwd: ~\Documents\repos\tiny-activation-dashboard
03:55:51.944 [info] Kernel successfully started
03:55:51.962 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe c:\Users\~\.cursor\extensions\ms-toolsai.jupyter-2024.8.1-universal\pythonFiles\printJupyterDataDir.py
03:56:13.363 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.8) for '~\Documents\repos\tiny-activation-dashboard\demo.ipynb' (disableUI=true)
03:56:14.038 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 626ms
03:56:14.094 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
03:56:14.105 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v366d6ef1a758b5a3d9462c8f21eef82f4cc817707.json
    > cwd: ~\Documents\repos\tiny-activation-dashboard
03:56:16.713 [info] Kernel successfully started
03:56:37.431 [info] Restart requested ~\Documents\repos\tiny-activation-dashboard\mwe.ipynb
03:56:37.447 [info] Process Execution: c:\WINDOWS\System32\taskkill.exe /F /T /PID 9908
03:56:37.466 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
03:56:37.609 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v3f9262a8f71bc86a40bf9228ebed8c85ff7fe1420.json
    > cwd: ~\Documents\repos\tiny-activation-dashboard
03:56:39.119 [info] Restarted dd5bbf27-d84e-4785-aca1-2f034fd95e0e
03:58:17.367 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.8) for '~\Documents\repos\tiny-activation-dashboard\demo copy.ipynb' (disableUI=true)
03:58:18.024 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 590ms
03:58:18.031 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
03:58:18.041 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v38b5430206db035f487f8234918906ea2c7d1337d.json
    > cwd: ~\Documents\repos\tiny-activation-dashboard
03:58:19.982 [info] Kernel successfully started
03:58:27.325 [info] Disposing request as the cell (4) was deleted ~\Documents\repos\tiny-activation-dashboard\demo.ipynb
03:58:27.330 [info] Dispose Kernel '~\Documents\repos\tiny-activation-dashboard\demo.ipynb' associated with '~\Documents\repos\tiny-activation-dashboard\demo.ipynb'
03:58:27.336 [info] Process Execution: c:\WINDOWS\System32\taskkill.exe /F /T /PID 13932
03:58:30.155 [info] Dispose Kernel '~\Documents\repos\tiny-activation-dashboard\demo copy.ipynb' associated with '~\Documents\repos\tiny-activation-dashboard\demo copy.ipynb'
03:58:30.163 [info] Process Execution: c:\WINDOWS\System32\taskkill.exe /F /T /PID 12944
03:58:30.266 [info] Starting Kernel (Python Path: ~\AppData\Local\Programs\Python\Python312\python.exe, Unknown, 3.12.8) for '~\Documents\repos\tiny-activation-dashboard\demo.ipynb' (disableUI=true)
03:58:30.657 [warn] Failed to get activated env vars for ~\AppData\Local\Programs\Python\Python312\python.exe in 348ms
03:58:30.665 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
03:58:30.680 [info] Process Execution: ~\AppData\Local\Programs\Python\Python312\python.exe -m ipykernel_launcher --f=c:\Users\~\AppData\Roaming\jupyter\runtime\kernel-v31af478d0081c1db3f4c97ccdcc6a3d8aa6629b9f.json
    > cwd: ~\Documents\repos\tiny-activation-dashboard
03:58:32.229 [info] Kernel successfully started

Coding Language and Runtime Version

Python 3.12.8

Language Extension Version (if applicable)

v2024.5.1

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

@Butanium Butanium added the bug Issue identified by VS Code Team member as probable bug label Jan 22, 2025
@DonJayamanne DonJayamanne assigned amunger and unassigned DonJayamanne Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

3 participants