Skip to content

The Semantic highlighting has been broken with Jupyter Notebook #4736

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

Closed
Saltsmart opened this issue Aug 21, 2023 · 10 comments
Closed

The Semantic highlighting has been broken with Jupyter Notebook #4736

Saltsmart opened this issue Aug 21, 2023 · 10 comments
Assignees
Labels
needs investigation Could be an issue - needs investigation waiting for user response Requires more information from user

Comments

@Saltsmart
Copy link

Type: Bug

It's always happening for both large and small notebook.
Please look at the following picture:

Extension version: 2023.8.30
VS Code version: Code 1.81.1 (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:22:42.175Z)
OS version: Windows_NT x64 10.0.22000
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.85GB (6.46GB free)
Process Argv --crash-reporter-id deaad0bf-2897-480e-b8cf-04d2a61dc2e3
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
pythonvs932:30410667
py29gd2263:30792226
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vsccc:30803844
2e4cg342:30602488
f6dab269:30613381
showlangstatbar:30737416
a2ce3375:30757347
pythonfmttext:30731395
pythoncmv:30756943
fixshowwlkth:30771522
showindicator:30805244
pythongtdpath:30769146
i26e3531:30792625
gsofb:30804716
pythonnosmt12:30797651
pythonidxptcf:30805731
pythonnoceb:30805159
dsvsc013:30795093
dsvsc014:30804076
diffeditorv1:30812748

@github-actions github-actions bot added the team needs to reproduce Issue has not been reproduced yet label Aug 21, 2023
@Saltsmart
Copy link
Author

error

@Saltsmart
Copy link
Author

image

@Saltsmart
Copy link
Author

I have not seen a panel for Pylance output.
Please let me know if you need any further information

@heejaechang
Copy link
Contributor

Can you provide us some logs as described in the troubleshooting guide?

@heejaechang heejaechang added waiting for user response Requires more information from user needs investigation Could be an issue - needs investigation and removed team needs to reproduce Issue has not been reproduced yet labels Aug 21, 2023
@Saltsmart
Copy link
Author

Can you provide us some logs as described in the troubleshooting guide?

I have found this always happens when I change the cell language type, for example from Python to raw, or vice versa.

@github-actions github-actions bot added user responded Was "waiting for user response" and they responded and removed waiting for user response Requires more information from user labels Aug 24, 2023
@Saltsmart
Copy link
Author

image

Here the Pylance goes broken.

@Saltsmart
Copy link
Author

Saltsmart commented Aug 24, 2023

Here is the trace log ("Pylance language server XXX (pyright xxx) starting" is not found in my log console, so I paste the content below "Starting service instance"):

2023-08-24 10:07:31.328 [info] [Info  - 10:07:31 AM] (13944) Starting service instance "Dataset_exploration"
2023-08-24 10:07:31.331 [info] (13944) WorkspaceFactory 0 remove e:\Project\N-CMAPSS-Data\Dataset_exploration:d:\anaconda3\envs\dl\python.exe
2023-08-24 10:07:31.331 [info] (13944) WorkspaceFactory 0 add e:\Project\N-CMAPSS-Data\Dataset_exploration:d:\anaconda3\envs\dl\python.exe
2023-08-24 10:07:31.344 [info] (13944) Server settings returned for workspace: e:\Project\N-CMAPSS-Data\Dataset_exploration: {
  "autoSearchPaths": true,
  "disableLanguageServices": false,
  "openFilesOnly": true,
  "useLibraryCodeForTypes": true,
  "watchForSourceChanges": true,
  "watchForLibraryChanges": true,
  "watchForConfigChanges": true,
  "typeCheckingMode": "off",
  "diagnosticSeverityOverrides": {
    "reportShadowedImports": "warning"
  },
  "logLevel": "log",
  "autoImportCompletions": false,
  "includeUserSymbolsInAutoImport": true,
  "indexing": true,
  "completeFunctionParens": false,
  "enableExtractCodeAction": true,
  "indexOptions": {
    "packageDepths": [
      [
        "sklearn",
        2,
        false
      ],
      [
        "matplotlib",
        2,
        false
      ],
      [
        "scipy",
        2,
        false
      ],
      [
        "django",
        2,
        false
      ],
      [
        "flask",
        2,
        false
      ],
      [
        "fastapi",
        2,
        false
      ]
    ],
    "userFileIndexingLimit": 2000
  },
  "variableInlayTypeHints": false,
  "functionReturnInlayTypeHints": false,
  "pytestParametersInlayTypeHints": false,
  "importFormat": "absolute",
  "fileSpecs": [],
  "excludeFileSpecs": [],
  "ignoreFileSpecs": [],
  "formatOnType": true,
  "taskListTokens": [],
  "addImportExactMatchOnly": false,
  "enablePytestSupport": true,
  "gotoDefinitionInStringLiteral": true,
  "downloadStubs": false,
  "remapDiagnostics": false,
  "intelliCodeEnabled": true,
  "pythonPath": "D:\\anaconda3\\python.exe",
  "pythonEnvironmentName": "3.11.3 (base conda)",
  "stubPath": "e:\\Project\\N-CMAPSS-Data\\Dataset_exploration\\typings",
  "fixAll": [],
  "extraCommitChars": true,
  "callArgumentNameInlayHints": false,
  "notebookRunStartupCommands": ""
}
2023-08-24 10:07:31.345 [info] (13944) No configuration file found.
2023-08-24 10:07:31.345 [info] (13944) No pyproject.toml file found.
2023-08-24 10:07:31.345 [info] [Info  - 10:07:31 AM] (13944) Setting pythonPath for service "Dataset_exploration": "d:\anaconda3\envs\dl\python.exe"
2023-08-24 10:07:31.345 [info] [Warn  - 10:07:31 AM] (13944) stubPath e:\Project\N-CMAPSS-Data\Dataset_exploration\typings is not a valid directory.
2023-08-24 10:07:31.479 [info] [Info  - 10:07:31 AM] (13944) Assuming Python version 3.11
2023-08-24 10:07:31.479 [info] (13944) Assuming Python platform Windows
2023-08-24 10:07:31.633 [info] [Info  - 10:07:31 AM] (13944) Search paths for e:\Project\N-CMAPSS-Data\Dataset_exploration
2023-08-24 10:07:31.634 [info] [Info  - 10:07:31 AM] (13944)   c:\Users\Administrator\.vscode\extensions\ms-python.vscode-pylance-2023.8.40\dist\typeshed-fallback\stdlib
2023-08-24 10:07:31.634 [info] [Info  - 10:07:31 AM] (13944)   e:\Project\N-CMAPSS-Data\Dataset_exploration
2023-08-24 10:07:31.634 [info] [Info  - 10:07:31 AM] (13944)   e:\Project\N-CMAPSS-Data\Dataset_exploration\typings
2023-08-24 10:07:31.634 [info] [Info  - 10:07:31 AM] (13944)   c:\Users\Administrator\.vscode\extensions\ms-python.vscode-pylance-2023.8.40\dist\typeshed-fallback\stubs\...
2023-08-24 10:07:31.634 [info] [Info  - 10:07:31 AM] (13944)   c:\Users\Administrator\.vscode\extensions\ms-python.vscode-pylance-2023.8.40\dist\bundled\stubs
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\DLLs
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\Lib
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   c:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\Lib\site-packages
2023-08-24 10:07:31.635 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\Lib\site-packages\win32
2023-08-24 10:07:31.636 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\Lib\site-packages\win32\lib
2023-08-24 10:07:31.636 [info] [Info  - 10:07:31 AM] (13944)   d:\anaconda3\envs\dl\Lib\site-packages\pythonwin
2023-08-24 10:07:31.636 [info] [Info  - 10:07:31 AM] (13944) Adding fs watcher for library directories:
 d:\anaconda3\envs\dl\DLLs
d:\anaconda3\envs\dl\Lib
d:\anaconda3\envs\dl
C:\Users\Administrator\AppData\Roaming\Python\Python311\site-packages
d:\anaconda3\envs\dl\Lib\site-packages
d:\anaconda3\envs\dl\Lib\site-packages\win32
d:\anaconda3\envs\dl\Lib\site-packages\win32\lib
d:\anaconda3\envs\dl\Lib\site-packages\Pythonwin
2023-08-24 10:07:31.636 [info] [Info  - 10:07:31 AM] (13944) Adding fs watcher for directories:
 e:\Project\N-CMAPSS-Data\Dataset_exploration
2023-08-24 10:07:31.637 [info] (13944) Searching for source files
2023-08-24 10:07:31.642 [info] [Info  - 10:07:31 AM] (13944) Found 1 source file
2023-08-24 10:07:32.126 [info] (13944) [BG(5)] indexing: e:\Project\N-CMAPSS-Data\Dataset_exploration\mpl_axes_aligner.py ...
2023-08-24 10:07:32.126 [info] (13944) [BG(5)]   parsing: e:\Project\N-CMAPSS-Data\Dataset_exploration\mpl_axes_aligner.py [fs read 2ms] (101ms)
2023-08-24 10:07:32.215 [info] (13944) [BG(5)]   parsing: c:\Users\Administrator\.vscode\extensions\ms-python.vscode-pylance-2023.8.40\dist\typeshed-fallback\stdlib\builtins.pyi [fs read 1ms] (88ms)
2023-08-24 10:07:32.251 [info] (13944) [BG(5)]   binding: c:\Users\Administrator\.vscode\extensions\ms-python.vscode-pylance-2023.8.40\dist\typeshed-fallback\stdlib\builtins.pyi (35ms)
2023-08-24 10:07:32.255 [info] (13944) [BG(5)]   binding: e:\Project\N-CMAPSS-Data\Dataset_exploration\mpl_axes_aligner.py (3ms)
2023-08-24 10:07:32.257 [info] (13944) [BG(5)] indexing: e:\Project\N-CMAPSS-Data\Dataset_exploration\mpl_axes_aligner.py [found 8] (233ms)
2023-08-24 10:08:15.137 [info] (13944) [BG(5)] getSemanticTokens full at e:\Project\N-CMAPSS-Data\Dataset_exploration\N-CMAPSS.ipynb:pylance-notebook-cell:Y205sZmlsZQ==.py (0ms)

@Saltsmart
Copy link
Author

Here is the conda environment specifics:

name: dl
channels:
  - pytorch
  - nvidia
  - defaults
  - conda-forge
dependencies:
  - asttokens=2.2.1=pyhd8ed1ab_0
  - backcall=0.2.0=pyhd3eb1b0_0
  - backports=1.1=pyhd3eb1b0_0
  - backports.functools_lru_cache=1.6.5=pyhd8ed1ab_0
  - blas=2.117=mkl
  - blas-devel=3.9.0=17_win64_mkl
  - brotli=1.0.9=h2bbff1b_7
  - brotli-bin=1.0.9=h2bbff1b_7
  - brotli-python=1.0.9=py311hd77b12b_7
  - bzip2=1.0.8=he774522_0
  - ca-certificates=2023.7.22=h56e8100_0
  - cached-property=1.5.2=py_0
  - certifi=2023.7.22=py311haa95532_0
  - charset-normalizer=3.2.0=pyhd8ed1ab_0
  - colorama=0.4.6=py311haa95532_0
  - comm=0.1.4=pyhd8ed1ab_0
  - contourpy=1.1.0=py311h005e61a_0
  - cuda-cccl=12.2.53=0
  - cuda-cudart=11.8.89=0
  - cuda-cudart-dev=11.8.89=0
  - cuda-cupti=11.8.87=0
  - cuda-libraries=11.8.0=0
  - cuda-libraries-dev=11.8.0=0
  - cuda-nvrtc=11.8.89=0
  - cuda-nvrtc-dev=11.8.89=0
  - cuda-nvtx=11.8.86=0
  - cuda-profiler-api=12.2.53=0
  - cuda-runtime=11.8.0=0
  - cycler=0.11.0=pyhd3eb1b0_0
  - debugpy=1.6.8=py311h12c1d0e_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - executing=1.2.0=pyhd8ed1ab_0
  - filelock=3.12.2=pyhd8ed1ab_0
  - fonttools=4.42.0=py311ha68e1ae_0
  - freetype=2.12.1=ha860e81_0
  - gettext=0.21.1=h5728263_0
  - git=2.41.0=h57928b3_0
  - glib=2.76.4=h12be248_0
  - glib-tools=2.76.4=h12be248_0
  - gst-plugins-base=1.22.5=h001b923_0
  - gstreamer=1.22.5=hb4038d2_0
  - h5py=3.9.0=nompi_py311hfbc32a6_100
  - hdf5=1.14.0=nompi_h918d9b7_103
  - icu=72.1=h63175ca_0
  - idna=3.4=py311haa95532_0
  - importlib-metadata=6.8.0=pyha770c72_0
  - importlib_metadata=6.8.0=hd8ed1ab_0
  - intel-openmp=2023.2.0=h57928b3_49496
  - ipykernel=6.25.0=pyh6817e22_0
  - ipython=8.14.0=pyh08f2357_0
  - jedi=0.19.0=pyhd8ed1ab_0
  - jinja2=3.1.2=py311haa95532_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - jupyter_client=8.3.0=pyhd8ed1ab_0
  - jupyter_core=5.3.1=py311h1ea47a8_0
  - kiwisolver=1.4.4=py311hd77b12b_0
  - krb5=1.20.1=h5b6d351_0
  - lcms2=2.15=h3e3b177_1
  - lerc=4.0.0=h63175ca_0
  - libaec=1.0.6=h63175ca_1
  - libblas=3.9.0=17_win64_mkl
  - libbrotlicommon=1.0.9=h2bbff1b_7
  - libbrotlidec=1.0.9=h2bbff1b_7
  - libbrotlienc=1.0.9=h2bbff1b_7
  - libcblas=3.9.0=17_win64_mkl
  - libclang=16.0.6=default_heb8d277_1
  - libclang13=16.0.6=default_hc80b9e7_1
  - libcublas=11.11.3.6=0
  - libcublas-dev=11.11.3.6=0
  - libcufft=10.9.0.58=0
  - libcufft-dev=10.9.0.58=0
  - libcurand=10.3.3.53=0
  - libcurand-dev=10.3.3.53=0
  - libcurl=8.1.2=h68f0423_0
  - libcusolver=11.4.1.48=0
  - libcusolver-dev=11.4.1.48=0
  - libcusparse=11.7.5.86=0
  - libcusparse-dev=11.7.5.86=0
  - libdeflate=1.18=hcfcfb64_0
  - libexpat=2.5.0=h63175ca_1
  - libffi=3.4.4=hd77b12b_0
  - libglib=2.76.4=he8f3873_0
  - libhwloc=2.9.2=nocuda_h15da153_1008
  - libiconv=1.17=h8ffe710_0
  - libjpeg-turbo=2.1.5.1=hcfcfb64_0
  - liblapack=3.9.0=17_win64_mkl
  - liblapacke=3.9.0=17_win64_mkl
  - libnpp=11.8.0.86=0
  - libnpp-dev=11.8.0.86=0
  - libnvjpeg=11.9.0.86=0
  - libnvjpeg-dev=11.9.0.86=0
  - libogg=1.3.5=h2bbff1b_1
  - libpng=1.6.39=h8cc25b3_0
  - libsodium=1.0.18=h62dcd97_0
  - libsqlite=3.42.0=hcfcfb64_0
  - libssh2=1.11.0=h7dfc565_0
  - libtiff=4.5.1=h6c8260b_0
  - libuv=1.44.2=h2bbff1b_0
  - libvorbis=1.3.7=he774522_0
  - libwebp-base=1.3.1=hcfcfb64_0
  - libxcb=1.15=hcd874cb_0
  - libxml2=2.11.5=hc3477c8_0
  - libzlib=1.2.13=hcfcfb64_5
  - lz4-c=1.9.4=h2bbff1b_0
  - m2w64-gcc-libgfortran=5.3.0=6
  - m2w64-gcc-libs=5.3.0=7
  - m2w64-gcc-libs-core=5.3.0=7
  - m2w64-gmp=6.1.0=2
  - m2w64-libwinpthread-git=5.0.0.4634.697f757=2
  - markupsafe=2.1.3=py311ha68e1ae_0
  - matplotlib=3.7.2=py311h1ea47a8_0
  - matplotlib-base=3.7.2=py311h6e989c2_0
  - matplotlib-inline=0.1.6=py311haa95532_0
  - mkl=2022.1.0=h6a75c08_874
  - mkl-devel=2022.1.0=h57928b3_875
  - mkl-include=2022.1.0=h6a75c08_874
  - mpmath=1.3.0=py311haa95532_0
  - msys2-conda-epoch=20160418=1
  - munkres=1.1.4=py_0
  - nest-asyncio=1.5.6=py311haa95532_0
  - networkx=3.1=py311haa95532_0
  - numpy=1.25.1=py311h0b4df5a_0
  - openjpeg=2.5.0=ha2aaf27_2
  - openssl=3.1.2=hcfcfb64_0
  - packaging=23.1=pyhd8ed1ab_0
  - pandas=2.0.3=py311hf63dbb6_1
  - parso=0.8.3=pyhd3eb1b0_0
  - patsy=0.5.3=py311haa95532_0
  - pcre2=10.40=h17e33f8_0
  - pickleshare=0.7.5=pyhd3eb1b0_1003
  - pillow=10.0.0=py311hde623f7_0
  - pip=23.2.1=py311haa95532_0
  - platformdirs=3.10.0=py311haa95532_0
  - ply=3.11=py311haa95532_0
  - pooch=1.7.0=pyha770c72_3
  - prompt-toolkit=3.0.39=pyha770c72_0
  - prompt_toolkit=3.0.39=hd8ed1ab_0
  - psutil=5.9.5=py311ha68e1ae_0
  - pthread-stubs=0.4=hcd874cb_1001
  - pthreads-win32=2.9.1=hfa6e2cd_3
  - pure_eval=0.2.2=pyhd3eb1b0_0
  - pygments=2.16.1=pyhd8ed1ab_0
  - pyparsing=3.0.9=py311haa95532_0
  - pyqt=5.15.9=py311h125bc19_4
  - pyqt5-sip=12.12.2=py311h12c1d0e_4
  - pysocks=1.7.1=py311haa95532_0
  - python=3.11.4=h2628c8c_0_cpython
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - python-tzdata=2023.3=pyhd3eb1b0_0
  - python_abi=3.11=3_cp311
  - pytorch=2.0.1=py3.11_cuda11.8_cudnn8_0
  - pytorch-cuda=11.8=h24eeafa_5
  - pytorch-mutex=1.0=cuda
  - pytz=2023.3=pyhd8ed1ab_0
  - pywin32=305=py311h2bbff1b_0
  - pyzmq=25.1.1=py311h7b3f143_0
  - qt-main=5.15.8=h2c8576c_12
  - requests=2.31.0=pyhd8ed1ab_0
  - scikit-learn=1.3.0=py311h142b183_0
  - scipy=1.11.1=py311h37ff6ca_0
  - seaborn=0.12.2=hd8ed1ab_0
  - seaborn-base=0.12.2=pyhd8ed1ab_0
  - setuptools=68.0.0=py311haa95532_0
  - sip=6.7.11=py311h12c1d0e_0
  - six=1.16.0=pyhd3eb1b0_1
  - stack_data=0.6.2=pyhd8ed1ab_0
  - statsmodels=0.14.0=py311hd7041d2_0
  - sympy=1.12=pyh04b8f61_3
  - tbb=2021.10.0=h91493d7_0
  - threadpoolctl=3.2.0=pyha21a80b_0
  - tk=8.6.12=h2bbff1b_0
  - toml=0.10.2=pyhd3eb1b0_0
  - tomli=2.0.1=py311haa95532_0
  - torchdiffeq=0.2.2=pyhd8ed1ab_0
  - tornado=6.3.3=py311ha68e1ae_0
  - tqdm=4.65.0=pyhd8ed1ab_1
  - traitlets=5.9.0=pyhd8ed1ab_0
  - trampoline=0.1.2=pyhd8ed1ab_0
  - typing_extensions=4.7.1=py311haa95532_0
  - tzdata=2023c=h04d1e81_0
  - ucrt=10.0.22621.0=h57928b3_0
  - urllib3=2.0.4=pyhd8ed1ab_0
  - vc=14.3=h64f974e_17
  - vc14_runtime=14.36.32532=hfdfe4a8_17
  - vs2015_runtime=14.36.32532=h05e6639_17
  - wcwidth=0.2.6=pyhd8ed1ab_0
  - wheel=0.41.1=pyhd8ed1ab_0
  - win_inet_pton=1.1.0=py311haa95532_0
  - xorg-libxau=1.0.11=hcd874cb_0
  - xorg-libxdmcp=1.1.3=hcd874cb_0
  - xz=5.4.2=h8cc25b3_0
  - zeromq=4.3.4=hd77b12b_0
  - zipp=3.16.2=pyhd8ed1ab_0
  - zlib=1.2.13=hcfcfb64_5
  - zstd=1.5.5=hd43e919_0
prefix: D:\anaconda3\envs\dl

@heejaechang
Copy link
Contributor

unfortunately, there is not much I can get from log (log seems not from logLevel: Trace) or repro it.

just in case, if this is on "python.analysis.enableSyncServer": true, can you change it to false and see whether it still repro?

otherwise, I think I would need actual repro files that I can try (like git repo I can clone that shows this issue) otherwise, it is hard to figure out just from images.

@heejaechang heejaechang added waiting for user response Requires more information from user and removed user responded Was "waiting for user response" and they responded labels Oct 19, 2023
@heejaechang
Copy link
Contributor

please reopen if it still repro. thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Could be an issue - needs investigation waiting for user response Requires more information from user
Projects
None yet
Development

No branches or pull requests

2 participants