vscode-jupyter icon indicating copy to clipboard operation
vscode-jupyter copied to clipboard

Run with precedent cell not working

Open luabud opened this issue 11 months ago • 2 comments

Type: Bug

  1. Clone this repo and open this notebook: https://github.com/luabud/pvscc-logo/blob/main/generate_logo.ipynb
  2. Create a new virtual environment and install the dependencies listed in requirements.txt (or just httpx, as a minimal example)
  3. Enable "jupyter.executionAnalysis.enabled" and "notebook.consolidatedRunButton"
  4. On second cell, select "Execute with precedent cell"

It doesn't seem to run for me.

Extension versions: Pylance: v2024.3.102 (pre-release) Jupyter: v2024.3.2024032701 (pre-release) Python: v2024.3.10871011 (pre-release)

Extension version: 2024.3.2024032701 VS Code version: Code - Insiders 1.88.0-insider (ae59067554575afaba07640320a26435c8e05175, 2024-04-02T12:33:18.940Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.146.1-microsoft-standard-WSL2

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 2995)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 31.71GB (12.74GB free)
Process Argv --log trace --log ms-python.autopep8=debug --crash-reporter-id 11494669-52ca-4f2c-aa0e-29172189cc8e
Screen Reader no
VM 0%
Item Value
Remote WSL: Ubuntu
OS Linux x64 5.15.146.1-microsoft-standard-WSL2
CPUs 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (5 x 2995)
Memory (System) 5.79GB (3.04GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vsc_aa:30263845
vscod805:30301674
vsaa593:30376534
py29gd2263:30784851
c4g48928:30535728
2i9eh265:30646982
962ge761:30841072
pythongtdpath:30726887
welcomedialog:30812478
pythonidxpt:30768918
pythonnoceb:30776497
asynctok:30898717
dsvsc013:30777762
dsvsc014:30777825
dsvsc015:30821418
pythontestfixt:30866404
pythonregdiag2:30926734
pyreplss1:30879911
pythonmypyd1:30859725
pythoncet0:30859736
h48ei257:31000450
pythontbext0:30879054
accentitlementst:30870582
dsvsc016:30879898
dsvsc017:30880771
dsvsc018:30880772
d6fi2104:30968146
cppperfnew:30980852
8082a590:30961435
fegfb526:30952798
bg6jg535:30979844
ccp1r6:30958151
pythonait:30973460
jchc7451:30973074
gee8j676:30988845
chatpanelc:31003589
g1icg217:30999571

luabud avatar Apr 02 '24 20:04 luabud

I had a similar experience not getting Run Dependent/Precedent cells to run as expected using https://github.com/minsa110/CaliforniaHousingPrediction/tree/main/Notebook

Similar setup as above:

  • Create a new virtual environment and install the dependencies listed in archive/requirements.txt
  • Enable "jupyter.executionAnalysis.enabled" and "notebook.consolidatedRunButton"

Extension versions: Pylance: v2024.3.102 Jupyter: v2024.3.2024032701 Python: v2024.3.10871011

However, I just tested again on the original repo and with Luciana's repo and it seems to work as expected. Perhaps, it has to do with timing or the behavior is inconsistent?

cwebster-99 avatar Apr 02 '24 21:04 cwebster-99

I wonder if it's because that Pylance takes time to activate/initialize and when I request for symbols, it early returns (return empty symbols if it is still loading), but @luabud maybe you can confirm.

With that said, we should probably look into how to ensure that we can wait for the initialization.

rebornix avatar Apr 03 '24 23:04 rebornix