microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 766 forks source link

High CPU usage MacOS #897

Closed harripj closed 3 years ago

harripj commented 3 years ago

Environment data

Expected behaviour

Reasonable CPU usage, for my Mac not to get hot with out running any code.

pylance activated jupyter notebook

Actual behaviour

Over 100% CPU usage as soon as Jupyter notebook .ipynb is opened and PyLance extension is activated. This has been tested and reproduced with both the insider v2021.1.4-pre.1 and stable version v2021.1.3 of PyLance. This problem shows up as high CPU usage from electron_node bundle.js, normally over 100%, and does not occur if a notebook is opened and PyLance is disabled. This problem exists whether the Jupyter server is started or not. Other extensions may be running (including Python extension) and this issue does not occur. If the notebook is closed then the problematic process remains. Cuts through my battery life like a hot knife knife through butter.

Logs

Output from ```code --status``` with open Jupyter notebook .ipynb and PyLance activated.
Version:          Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:30:02.420Z)
OS Version:       Darwin x64 20.2.0
CPUs:             Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
Memory (System):  16.00GB (0.68GB free)
Load (avg):       3, 3, 3
VM:               0%
Screen Reader:    no
Process Argv:     --crash-reporter-id 128552f9-e223-4ba5-9ba2-01f969690f73
GPU Status:       2d_canvas:                  enabled
                  flash_3d:                   enabled
                  flash_stage3d:              enabled
                  flash_stage3d_baseline:     enabled
                  gpu_compositing:            enabled
                  metal:                      disabled_off
                  multiple_raster_threads:    enabled_on
                  oop_rasterization:          enabled
                  opengl:                     enabled_on
                  protected_video_decode:     unavailable_off
                  rasterization:              enabled
                  skia_renderer:              disabled_off_ok
                  video_decode:               enabled
                  webgl:                      enabled
                  webgl2:                     enabled

CPU %   Mem MB     PID  Process
    3      197   98701  code main
    0       66   98704     gpu-process
    0       16   98706     utility
   89      131   98733     shared-process
    0        0   99676       /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    3      295   99507     window (Phantom.ipynb)
    0        0   99508       /bin/zsh -l
    0        0   99658         bash /usr/local/bin/code --status
    1       33   99668           electron_node cli.js 
    0      131   99512       extensionHost
  210      590   99615         electron_node bundle.js 
    0       16   99630         /opt/anaconda3/bin/python /Users/paddyharrison/.vscode/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
    0       16   99631         /opt/anaconda3/bin/python /Users/paddyharrison/.vscode/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
    0       16   99632         /opt/anaconda3/bin/python /Users/paddyharrison/.vscode/extensions/ms-toolsai.jupyter-2020.12.414227025/pythonFiles/pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
    0      279   99561     window (undefined)
jakebailey commented 3 years ago

Can you provide trace logs from the LS output window? That is a process dump, which doesn't give us much to go off of. https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#filing-an-issue

harripj commented 3 years ago

From the Python Output log:

User belongs to experiment group 'AlwaysDisplayTestExplorer - control'
User belongs to experiment group 'ShowPlayIcon - start'
User belongs to experiment group 'DebugAdapterFactory - experiment'
User belongs to experiment group 'PtvsdWheels37 - experiment'
User belongs to experiment group 'UseTerminalToGetActivatedEnvVars - control'
User belongs to experiment group 'LocalZMQKernel - experiment'
User belongs to experiment group 'CollectLSRequestTiming - experiment'
User belongs to experiment group 'CollectNodeLSRequestTiming - experiment'
User belongs to experiment group 'EnableIPyWidgets - experiment'
User belongs to experiment group 'RunByLine - experiment'
User belongs to experiment group 'CustomEditorSupport - control'
User belongs to experiment group 'pythonaacf'
User belongs to experiment group 'pythonJoinMailingListVar2'
User belongs to experiment group 'pythonSendEntireLineToREPL'
User belongs to experiment group 'pythonInstallPylintButtonFirstcf'
> pyenv root
> python3.7 ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3.6 ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python3 ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python2 ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> python ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> /opt/anaconda3/envs/pyxem/bin/python ~/.vscode/extensions/ms-python.python-2021.1.502429796/pythonFiles/pyvsc-run-isolated.py -c "import sys;print(sys.executable)"
> /opt/anaconda3/bin info --json
> /opt/anaconda3/bin env list
> /opt/anaconda3/bin env list
> /opt/anaconda3/bin env list
> /opt/anaconda3/bin env list
Python interpreter path: /opt/anaconda3/envs/pyxem/bin/python
Starting Pylance language server.
Error 2021-01-29 22:03:09: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
Error 2021-01-29 22:03:09: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
> /opt/anaconda3/bin env list
Error 2021-01-29 22:03:09: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
Error 2021-01-29 22:03:09: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
Error 2021-01-29 22:03:09: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
> /opt/anaconda3/bin --version
> /opt/anaconda3/bin env list
> /opt/anaconda3/bin env list
Error 2021-01-29 22:03:20: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}
Error 2021-01-29 22:03:20: Failed to get conda environment list from conda [Error: spawn /opt/anaconda3/bin EACCES
    at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
    at onErrorNT (internal/child_process.js:456:16)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)] {
  errno: 'EACCES',
  code: 'EACCES',
  syscall: 'spawn /opt/anaconda3/bin',
  path: '/opt/anaconda3/bin',
  spawnargs: [ 'env', 'list' ]
}

The Output from Python Language Server appears to keep looping over the same error (attached file). Python Language Server Output.txt

Also see attached Conda environment:

name: pyxem
channels:
  - conda-forge
  - defaults
dependencies:
  - alabaster=0.7.12=py_0
  - appdirs=1.4.4=pyh9f0ad1d_0
  - appnope=0.1.2=py38h50d1736_1
  - argon2-cffi=20.1.0=py38h5406a74_2
  - asciitree=0.3.3=py_2
  - ase=3.20.1=py_0
  - asteval=0.9.16=pyh5ca1d4c_0
  - async_generator=1.10=py_0
  - attrs=20.3.0=pyhd3deb0d_0
  - babel=2.9.0=pyhd3deb0d_0
  - backcall=0.2.0=pyh9f0ad1d_0
  - black=20.8b1=py_1
  - bleach=3.2.2=pyh44b312d_0
  - blosc=1.21.0=h046ec9c_0
  - bokeh=2.2.3=py38h50d1736_0
  - brotli=1.0.9=h046ec9c_4
  - brotlipy=0.7.0=py38h5406a74_1001
  - brunsli=0.1=h046ec9c_0
  - bzip2=1.0.8=hc929b4f_4
  - c-ares=1.17.1=hc929b4f_0
  - ca-certificates=2020.12.5=h033912b_0
  - cached-property=1.5.1=py_0
  - cachey=0.2.1=pyh9f0ad1d_0
  - cairo=1.16.0=h4ec454a_1007
  - certifi=2020.12.5=py38h50d1736_1
  - cffi=1.14.4=py38h979bc6b_1
  - chardet=4.0.0=py38h50d1736_1
  - charls=2.2.0=h046ec9c_0
  - click=7.1.2=pyh9f0ad1d_0
  - cloudpickle=1.6.0=py_0
  - colorama=0.4.4=pyh9f0ad1d_0
  - conda=4.9.2=py38h50d1736_0
  - conda-package-handling=1.7.2=py38h94c058a_0
  - cryptography=3.3.1=py38h6b4ec92_1
  - cycler=0.10.0=py_2
  - cytoolz=0.11.0=py38h5406a74_3
  - dask=2021.1.1=pyhd8ed1ab_0
  - dask-core=2021.1.1=pyhd8ed1ab_0
  - dataclasses=0.7=pyhb2cacf7_7
  - dbus=1.13.6=h0c50699_1
  - decorator=4.4.2=py_0
  - defusedxml=0.6.0=py_0
  - diffpy.pdfmorph=0.0.1=py_1
  - diffpy.structure=3.0.1=py_0
  - diffpy.utils=3.0.0=py_0
  - diffsims=0.4.0=pyhd8ed1ab_0
  - dill=0.3.3=pyhd8ed1ab_0
  - distributed=2021.1.1=py38h50d1736_0
  - docutils=0.16=py38h50d1736_3
  - entrypoints=0.3=pyhd8ed1ab_1003
  - expat=2.2.9=h046ec9c_3
  - fabio=0.11.0=py38hc7193ba_0
  - fasteners=0.14.1=py_3
  - ffmpeg=4.3.1=hb787a4c_2
  - flask=1.1.2=pyh9f0ad1d_0
  - fontconfig=2.13.1=hd23ceaa_1004
  - freetype=2.10.4=h4cff582_1
  - freetype-py=2.2.0=pyh9f0ad1d_0
  - fsspec=0.8.5=pyhd8ed1ab_0
  - future=0.18.2=py38h50d1736_3
  - gettext=0.19.8.1=h7937167_1005
  - giflib=5.2.1=hbcb3906_2
  - glib=2.66.4=h22858aa_2
  - glib-tools=2.66.4=h22858aa_2
  - glymur=0.9.3=pyhd8ed1ab_0
  - gmp=6.2.1=h2e338ed_0
  - gmpy2=2.1.0b1=py38haf64e2c_1
  - gnutls=3.6.13=h756fd2b_1
  - graphite2=1.3.13=h2e338ed_1001
  - h5py=3.1.0=nompi_py38h5142359_100
  - harfbuzz=2.7.4=hf28d55f_0
  - hdf5=1.10.6=nompi_hc5d9132_1114
  - heapdict=1.0.1=py_0
  - hyperspy=1.6.1=py38h50d1736_0
  - hyperspy-base=1.6.1=py38h1130bcf_0
  - hyperspy-gui-ipywidgets=1.3.0=py_0
  - hyperspy-gui-traitsui=1.3.1=pyhd8ed1ab_0
  - icu=68.1=h74dc148_0
  - idna=2.10=pyh9f0ad1d_0
  - imagecodecs=2021.1.11=py38hb15f0e6_1
  - imageio=2.9.0=py_0
  - imagesize=1.2.0=py_0
  - importlib-metadata=3.4.0=py38h50d1736_0
  - importlib_metadata=3.4.0=hd8ed1ab_0
  - importlib_resources=5.1.0=py38h50d1736_0
  - ipykernel=5.4.3=py38h9bb44b7_0
  - ipympl=0.6.2=pyhd8ed1ab_0
  - ipyparallel=6.3.0=py38h50d1736_2
  - ipython=7.19.0=py38h9bb44b7_0
  - ipython_genutils=0.2.0=py_1
  - ipywidgets=7.6.3=pyhd3deb0d_0
  - itsdangerous=1.1.0=py_0
  - jasper=1.900.1=h636a363_1006
  - jedi=0.18.0=py38h50d1736_2
  - jinja2=2.11.2=pyh9f0ad1d_0
  - joblib=1.0.0=pyhd8ed1ab_0
  - jpeg=9d=hbcb3906_0
  - jsonschema=3.2.0=py_2
  - jupyter_client=6.1.11=pyhd8ed1ab_1
  - jupyter_core=4.7.0=py38h50d1736_1
  - jupyterlab_pygments=0.1.2=pyh9f0ad1d_0
  - jupyterlab_widgets=1.0.0=pyhd8ed1ab_1
  - jxrlib=1.1=h35c211d_2
  - khronos-opencl-icd-loader=2020.12.18=h35c211d_0
  - kiwisolver=1.3.1=py38hd9c93a9_1
  - krb5=1.17.2=h60d9502_0
  - lame=3.100=h35c211d_1001
  - lcms2=2.11=h11f7e16_1
  - lerc=2.2.1=h046ec9c_0
  - libaec=1.0.4=h046ec9c_1
  - libarchive=3.5.1=h0a5793d_1
  - libblas=3.9.0=7_openblas
  - libcblas=3.9.0=7_openblas
  - libclang=11.0.1=default_hf8bb9ca_1
  - libcurl=7.71.1=h9bf37e3_8
  - libcxx=11.0.1=habf9029_0
  - libdeflate=1.7=h35c211d_5
  - libedit=3.1.20191231=h0678c8f_2
  - libev=4.33=haf1e3a3_1
  - libffi=3.3=h046ec9c_2
  - libgfortran=5.0.0=9_3_0_h6c81a4c_17
  - libgfortran5=9.3.0=h6c81a4c_17
  - libglib=2.66.4=h7424822_2
  - libiconv=1.16=haf1e3a3_0
  - liblapack=3.9.0=7_openblas
  - liblapacke=3.9.0=7_openblas
  - libllvm10=10.0.1=h009f743_3
  - libllvm11=11.0.1=h223d4b2_0
  - libnghttp2=1.41.0=h7580e61_2
  - libopenblas=0.3.12=openmp_h54245bb_1
  - libopencv=4.5.0=py38_6
  - libpng=1.6.37=h7cec526_2
  - libpq=12.3=h7049927_3
  - libsodium=1.0.18=hbcb3906_1
  - libsolv=0.7.17=hfd3ada9_0
  - libssh2=1.9.0=h8a08a2b_5
  - libtiff=4.2.0=h355d032_0
  - libwebp-base=1.1.0=hbcb3906_3
  - libxml2=2.9.10=h802ca4f_3
  - libxslt=1.1.33=h5739fc3_2
  - libzopfli=1.0.3=h046ec9c_0
  - link-traits=1.0.3=pyhd8ed1ab_3
  - llvm-openmp=11.0.1=h7c73e74_0
  - llvmlite=0.35.0=py38hc583f44_1
  - lmfit=1.0.1=py_1
  - locket=0.2.0=py_2
  - lxml=4.6.2=py38h7d97eb6_1
  - lz4-c=1.9.3=h046ec9c_0
  - lzo=2.10=haf1e3a3_1000
  - magicgui=0.2.5=pyhd8ed1ab_0
  - mako=1.1.4=pyh44b312d_0
  - mamba=0.7.8=py38hd124b62_1
  - markupsafe=1.1.1=py38h5406a74_3
  - matplotlib=3.3.3=py38h50d1736_0
  - matplotlib-base=3.3.3=py38hdcc317e_0
  - mistune=0.8.4=py38h5406a74_1003
  - monotonic=1.5=py_0
  - mpc=1.1.0=ha57cd0f_1009
  - mpfr=4.0.2=h72d8aaf_1
  - mpmath=1.1.0=py_0
  - mrcz=0.5.6=pyh9f0ad1d_1
  - msgpack-python=1.0.2=py38hd9c93a9_1
  - mypy_extensions=0.4.3=py38h50d1736_3
  - mysql-common=8.0.22=h694c41f_3
  - mysql-libs=8.0.22=h70aab77_3
  - napari=0.4.3=pyhd8ed1ab_0
  - napari-plugin-engine=0.1.9=py38h50d1736_1
  - napari-svg=0.1.4=py_0
  - natsort=7.1.1=pyhd8ed1ab_0
  - nbclient=0.5.1=py_0
  - nbconvert=6.0.7=py38h50d1736_3
  - nbformat=5.1.2=pyhd8ed1ab_1
  - ncempy=1.8.1=pyhd8ed1ab_0
  - ncurses=6.2=h2e338ed_4
  - nest-asyncio=1.4.3=pyhd8ed1ab_0
  - nettle=3.6=hedd7734_0
  - networkx=2.5=py_0
  - nglview=2.7.7=pyh5ca1d4c_1
  - notebook=6.2.0=py38h50d1736_0
  - nspr=4.29=hbc8d48c_1
  - nss=3.47=hc0980d9_0
  - numba=0.52.0=py38he9f00de_0
  - numcodecs=0.7.3=py38h0a5c65b_0
  - numexpr=2.7.2=py38he9f00de_0
  - numpy=1.19.5=py38h6ced74f_1
  - numpydoc=1.1.0=py_1
  - ocl_icd_wrapper_apple=1.0.0=hbcb3906_0
  - olefile=0.46=pyh9f0ad1d_1
  - opencv=4.5.0=py38_6
  - openh264=2.1.1=hfd3ada9_0
  - openjpeg=2.4.0=h6cbf5cd_0
  - openssl=1.1.1i=h35c211d_0
  - orix=0.5.1=pyhd8ed1ab_1
  - packaging=20.8=pyhd3deb0d_0
  - pandas=1.2.1=py38he9f00de_0
  - pandoc=2.11.4=h35c211d_0
  - pandocfilters=1.4.2=py_1
  - parso=0.8.1=pyhd8ed1ab_0
  - partd=1.1.0=py_0
  - pathspec=0.8.1=pyhd3deb0d_0
  - pcre=8.44=hb1e8313_0
  - pexpect=4.8.0=pyh9f0ad1d_2
  - pickleshare=0.7.5=py_1003
  - pillow=8.1.0=py38hc1d52f7_1
  - pint=0.16.1=py_0
  - pip=21.0=pyhd8ed1ab_0
  - pixman=0.40.0=hbcb3906_0
  - pooch=1.3.0=pyhd8ed1ab_0
  - prettytable=2.0.0=pyhd8ed1ab_0
  - prometheus_client=0.9.0=pyhd3deb0d_0
  - prompt-toolkit=3.0.14=pyha770c72_0
  - psutil=5.8.0=py38h5406a74_1
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - py-opencv=4.5.0=py38h9bb44b7_6
  - pycifrw=4.4.1=py38h4d0b108_2
  - pycosat=0.6.3=py38h5406a74_1006
  - pycparser=2.20=pyh9f0ad1d_2
  - pyface=7.1.0=pyh9f0ad1d_0
  - pyfai-base=0.19.0=py38hcf432d8_3
  - pygments=2.7.4=pyhd8ed1ab_0
  - pyopencl=2020.3.1=py38h692b87f_0
  - pyopengl=3.1.5=py_0
  - pyopenssl=20.0.1=pyhd8ed1ab_0
  - pyparsing=2.4.7=pyh9f0ad1d_0
  - pyqt=5.12.3=py38h50d1736_7
  - pyqt-impl=5.12.3=py38h721a93c_7
  - pyqt5-sip=4.19.18=py38h5745d40_7
  - pyqtchart=5.12=py38h721a93c_7
  - pyqtwebengine=5.12.1=py38h721a93c_7
  - pyrsistent=0.17.3=py38h5406a74_2
  - pyside2=5.13.2=py38hc6340e1_4
  - pysocks=1.7.1=py38h50d1736_3
  - python=3.8.6=h624753d_4_cpython
  - python-blosc=1.10.2=py38he9f00de_0
  - python-dateutil=2.8.1=py_0
  - python.app=1.3=py38h5406a74_4
  - python_abi=3.8=1_cp38
  - pytools=2021.1=pyhd3deb0d_0
  - pytz=2020.5=pyhd8ed1ab_0
  - pyusid=0.0.9=py_0
  - pywavelets=1.1.1=py38hc7193ba_3
  - pyxem=0.13.0=pyhd8ed1ab_0
  - pyyaml=5.4.1=py38h5406a74_0
  - pyzmq=20.0.0=py38h1cb0b96_1
  - qt=5.12.9=h126340a_2
  - qtconsole=5.0.2=pyhd8ed1ab_0
  - qtpy=1.9.0=py_0
  - readline=8.0=h0678c8f_2
  - regex=2020.11.13=py38h5406a74_1
  - reproc=14.2.1=hbcb3906_0
  - reproc-cpp=14.2.1=h2e338ed_0
  - requests=2.25.1=pyhd3deb0d_0
  - ruamel_yaml=0.15.80=py38h5406a74_1003
  - scikit-image=0.18.1=py38he9f00de_0
  - scikit-learn=0.24.1=py38hfd19401_0
  - scipy=1.6.0=py38h95ea19e_0
  - send2trash=1.5.0=py_0
  - setuptools=49.6.0=py38h50d1736_3
  - sidpy=0.0.4=pyhd8ed1ab_0
  - silx-base=0.14.0=py38he9f00de_0
  - six=1.15.0=pyh9f0ad1d_0
  - snappy=1.1.8=hb1e8313_3
  - snowballstemmer=2.1.0=pyhd8ed1ab_0
  - sortedcontainers=2.3.0=pyhd8ed1ab_0
  - sparse=0.11.2=py_0
  - sphinx=3.4.3=pyhd8ed1ab_0
  - sphinxcontrib-applehelp=1.0.2=py_0
  - sphinxcontrib-devhelp=1.0.2=py_0
  - sphinxcontrib-htmlhelp=1.0.3=py_0
  - sphinxcontrib-jsmath=1.0.1=py_0
  - sphinxcontrib-qthelp=1.0.3=py_0
  - sphinxcontrib-serializinghtml=1.1.4=py_0
  - sqlite=3.34.0=h17101e1_0
  - sympy=1.7.1=py38h50d1736_1
  - tblib=1.6.0=py_0
  - terminado=0.9.2=py38h50d1736_0
  - testpath=0.4.4=py_0
  - threadpoolctl=2.1.0=pyh5ca1d4c_0
  - tifffile=2021.1.14=pyhd8ed1ab_0
  - tk=8.6.10=h0419947_1
  - toml=0.10.2=pyhd8ed1ab_0
  - toolz=0.11.1=py_0
  - tornado=6.1=py38h5406a74_1
  - tqdm=4.56.0=pyhd8ed1ab_0
  - traitlets=5.0.5=py_0
  - traits=6.2.0=py38h5406a74_0
  - traitsui=7.1.0=pyh9f0ad1d_0
  - transforms3d=0.3.1=py_0
  - typed-ast=1.4.2=py38h5406a74_0
  - typing_extensions=3.7.4.3=py_0
  - uncertainties=3.1.5=pyhd8ed1ab_0
  - urllib3=1.26.2=pyhd8ed1ab_0
  - vispy=0.6.6=py38h3b4089a_0
  - wcwidth=0.1.9=pyh9f0ad1d_0
  - webencodings=0.5.1=py_1
  - werkzeug=1.0.1=pyh9f0ad1d_0
  - wheel=0.36.2=pyhd3deb0d_0
  - widgetsnbextension=3.5.1=py38h50d1736_4
  - wrapt=1.12.1=py38h5406a74_3
  - x264=1!161.3030=h35c211d_0
  - xz=5.2.5=haf1e3a3_1
  - yaml=0.2.5=haf1e3a3_0
  - zarr=2.6.1=pyhd8ed1ab_0
  - zeromq=4.3.3=h74dc148_3
  - zfp=0.5.5=h046ec9c_4
  - zict=2.0.0=py_0
  - zipp=3.4.0=py_0
  - zlib=1.2.11=h7795811_1010
  - zstd=1.4.8=hf387650_1
prefix: /opt/anaconda3/envs/pyxem

I hope this helps, and thanks.

jakebailey commented 3 years ago

Something is causing a repeated invalidateAndForceReanalysis. If you downgrade to 2021.1.2, does the issue reappear? This may be related to our changes to fix folder deletion detection in workspace file watching.

Additionally, this is scary:

Search paths found for configured python interpreter:
  /

Can you check your config to see if you've somehow included your entire filesystem as an import root in a config somewhere? We set up file watches, and it's a bit scary that the interpreter is including it as a search path.

harripj commented 3 years ago

@jakebailey thanks for the advice. So there was a problem with my conda path which I have now sorted, but this was not the problem.

I have tried downgrading to 2021.1.2 as you suggested but the problem persists on both builds.

But after testing more like you suggested I think I have found part of the problem. In my .zshrc I normally have: export PYTHONPATH="$PYTHONPATH:$HOME/Documents/GitHub:$HOME/Documents/GitHub/Python:$HOME/Documents/GitHub/3D-SPED" and when the Python Language Server (PLS) is initiated with this I have the problem above and also that I have root in my search path as you mentioned.

After a lot of trialling the root '/' that appears in the PLS search path comes from my .zshrc script, and specifically the first part PYTHONPATH="$PYTHONPATH. As PYTHONPATH was initially undefined this exports an empty :, ie. echo $PYTHONPATH gives :/Users/paddyharrison/Documents:/Users/paddyharrison/Documents/GitHub/Python in my case, and the first : is what I suspect that PLS is picking up and interpreting as '/'. And in fact this problem happens if there is a colon unbounded on one side anywhere in PYTHONPATH. If '/' does not appear in PLS search path, there is no problem with CPU usage. I have attached the Output log when all appears to work fine and there is no looping problem and CPU usage is normal. PLS output no problem.txt

Possibly this is just a problem with my environment variable setup, but there is a lot of advice online to append to PYTHONPATH rather than overwrite it (as I had done), so other people may be having the same problem.

Thanks very much for the advice!

jakebailey commented 3 years ago

I'd have to look it up, but I think I recall that there was a semantic meaning to having an empty item in PYTHONPATH.

In any case, likely what's happening then is that we are not guarding against the empty string when calling Python for sys.path, and then when we "resolve" the path to its final absolute path, that's coming back as /. I'll take a look once I'm back in the office (if I'm not beaten to the fix).

jakebailey commented 3 years ago

As far as I can tell, the code we've written should actually be ignoring these empty entries, including those given by the interpreter and the new PYTHONPATH config. @harripj Is there any chance you could run Python from a terminal and just show the value of sys.path with import sys? I'm curious whether or not Python itself is doing something strange here and we just need to learn to ignore /.

harripj commented 3 years ago

From the same Conda environment when my .zshrc is written as:

# setup PYTHONPATH
PYTHONPATH=$HOME/Documents/GitHub
PYTHONPATH=$PYTHONPATH:$HOME/Documents/GitHub/Python
PYTHONPATH=$PYTHONPATH:$HOME/Documents/GitHub/3D-SPED
export PYTHONPATH

and PYTHONPATH does not include the empty string (echo $PYTHONPATH >>> /Users/paddyharrison/Documents/GitHub:/Users/paddyharrison/Documents/GitHub/Python:/Users/paddyharrison/Documents/GitHub/3D-SPED) sys.path gives:

>>> sys.path
['', '/Users/paddyharrison/Documents/GitHub', '/Users/paddyharrison/Documents/GitHub/Python', '/Users/paddyharrison/Documents/GitHub/3D-SPED', '/opt/anaconda3/envs/pyxem/lib/python38.zip', '/opt/anaconda3/envs/pyxem/lib/python3.8', '/opt/anaconda3/envs/pyxem/lib/python3.8/lib-dynload', '/opt/anaconda3/envs/pyxem/lib/python3.8/site-packages']

The first entry is still empty.

For comparison if my .zshrc is written as:

# setup PYTHONPATH
PYTHONPATH=$PYTHONPATH:$HOME/Documents/GitHub
PYTHONPATH=$PYTHONPATH:$HOME/Documents/GitHub/Python
PYTHONPATH=$PYTHONPATH:$HOME/Documents/GitHub/3D-SPED
export PYTHONPATH

which does include the empty string (echo $PYTHONPATH >>> :/Users/paddyharrison/Documents/GitHub:/Users/paddyharrison/Documents/GitHub/Python:/Users/paddyharrison/Documents/GitHub/3D-SPED) and we have the problem discussed, sys.path gives:

>>> sys.path
['', '/Users/paddyharrison', '/Users/paddyharrison/Documents/GitHub', '/Users/paddyharrison/Documents/GitHub/Python', '/Users/paddyharrison/Documents/GitHub/3D-SPED', '/opt/anaconda3/envs/pyxem/lib/python38.zip', '/opt/anaconda3/envs/pyxem/lib/python3.8', '/opt/anaconda3/envs/pyxem/lib/python3.8/lib-dynload', '/opt/anaconda3/envs/pyxem/lib/python3.8/site-packages']

which looks to be the same to me apart from the inclusion of my home directory (does Python do this?) and of course the looping problem which seems to be linked to Background analysis message: invalidateAndForceReanalysis shown in the PLS output trace.

jakebailey commented 3 years ago

Thanks. That first directory is always empty at the REPL or when run in module mode; that's replaced by the directory of the script when run in script mode.

I have no idea where your $HOME is coming into play in the second example. Nothing there should be adding it, and adding the entire home is likely to turn out poorly for file watching as well, but your original example didn't do that and instead had /, so I guess I'll have to figure out if I can reproduce it.

harripj commented 3 years ago

I'm not sure where home comes into it either. I have tried without editing PYTHONPATH in my .zshrc and my home directory does not appear in sys.path. Likewise if I only set export PYTHONPATH=$PYTHONPATH in my .zshrc.

harripj commented 3 years ago

Actually if my .zshrc is just export PYTHONPATH=$PYTHONPATH:, ie, with the trailing :, then my home directory ends up in sys.path. So the unbounded colon appears to be the problem(?) in this case too.

harripj commented 3 years ago

The above is also the case if .zshrc is just export PYTHONPATH=:, which may make it easier to test.

jakebailey commented 3 years ago

@harripj Could you try this again in 2021.2.1? There was a fix to what we pull out of sys.path, which may have fixed this, but I'm not confident enough to close this as fixed quite yet.

harripj commented 3 years ago

Hi, thanks for the update. I have installed version 2021.2.1 and set my PYTHONPATH with the unbound colon: echo $PYTHONPATH > :/Users/paddyharrison/Documents/GitHub:/Users/paddyharrison/Documents/GitHub/Python:/Users/paddyharrison/Documents/GitHub/3D-SPED and get the following trace: pylance 2021.2.1 trace.txt

At the top of the file it doesn't look like root or my home directory make it into the search paths, which is good. However there appears to be a too many files open error which is repeating and causing a problem. I made sure to only have one file (.py) open in VS Code when I took this trace but this problem is still there.

PYTHONPATH and code --status below:

(pyxem) paddyharrison@wifi-campus076 ~ % echo $PYTHONPATH
:/Users/paddyharrison/Documents/GitHub:/Users/paddyharrison/Documents/GitHub/Python:/Users/paddyharrison/Documents/GitHub/3D-SPED
(pyxem) paddyharrison@wifi-campus076 ~ % code --status
(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
Version:          Code 1.53.1 (5d424b828ada08e1eb9f95d6cb41120234ef57c7, 2021-02-08T23:35:15.302Z)
OS Version:       Darwin x64 20.3.0
CPUs:             Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
Memory (System):  16.00GB (0.10GB free)
Load (avg):       2, 2, 2
VM:               0%
Screen Reader:    no
Process Argv:     --crash-reporter-id 128552f9-e223-4ba5-9ba2-01f969690f73
GPU Status:       2d_canvas:                  enabled
                  gpu_compositing:            enabled
                  metal:                      disabled_off
                  multiple_raster_threads:    enabled_on
                  oop_rasterization:          enabled
                  opengl:                     enabled_on
                  protected_video_decode:     unavailable_off
                  rasterization:              enabled
                  skia_renderer:              disabled_off_ok
                  video_decode:               enabled
                  webgl:                      enabled
                  webgl2:                     enabled

CPU %   Mem MB     PID  Process
    1       98   12059  code main
    2       82   12062     gpu-process
    0       33   12064     utility
   13      262   12065     window (circle_fitting.py)
    0      115   12092       extensionHost
    0      147   12125         electron_node bundle.js 
    0       33   12195         /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=12092
    0        0   12285         /usr/local/bin/git fetch
    0        0   12286           /usr/local/Cellar/git/2.30.1/libexec/git-core/git remote-https origin https://github.com/harripj/Python.git
    0        0   12287             /usr/local/Cellar/git/2.30.1/libexec/git-core/git-remote-https origin https://github.com/harripj/Python.git
    0        0   12291       /bin/zsh -l
    0        0   12333         bash /usr/local/bin/code --status
   18       33   12343           electron_node cli.js 
    0      115   12137     shared-process
jakebailey commented 3 years ago

Yes, apologies, that's #936, which we're in the process of hotfixing now.

jakebailey commented 3 years ago

Now that #936 is gone in 2021.2.2, can you try again with that new version?

harripj commented 3 years ago

I have tried the update here and it seems to have fixed the issue- PLS trace:

[Info  - 7:49:42 PM] Pylance language server 2021.2.2 (pyright 8ca2c14a) starting
[Info  - 7:49:42 PM] Server root directory: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist
[Info  - 7:49:42 PM] Setting pythonPath for service "<default>": "C:/Users/Patrick Harrison/anaconda3/envs/pyxem/python.exe"
No search paths found for configured python interpreter.
[Error - 7:49:42 PM] stubPath typings is not a valid directory.
[Info  - 7:49:42 PM] Unable to get Python version from interpreter
[Info  - 7:49:42 PM] Assuming Python platform Darwin
[Info  - 7:49:42 PM] Searching for source files
[Info  - 7:49:42 PM] No source files found.
[Info  - 7:49:42 PM] Background analysis(1) root directory: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist
[Info  - 7:49:42 PM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
Background analysis message: getSemanticTokens
[BG(1)] parsing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (18ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (85ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (35ms)
[BG(1)] binding: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 1ms] (7ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (21ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi (11ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi [fs read 1ms] (4ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi (2ms)
Background analysis message: getSemanticTokens
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py ...
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (4ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (4ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (14ms)
[FG] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (82ms)
[FG] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (34ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
Received updated settings
[Info  - 7:49:49 PM] Setting pythonPath for service "<default>": "/opt/anaconda3/envs/pyxem/bin/python"
Search paths found for configured python interpreter:
  /Users/paddyharrison/Documents/GitHub
  /Users/paddyharrison/Documents/GitHub/Python
  /Users/paddyharrison/Documents/GitHub/3D-SPED
  /opt/anaconda3/envs/pyxem/lib/python3.8
  /opt/anaconda3/envs/pyxem/lib/python3.8/lib-dynload
  /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages
[Error - 7:49:49 PM] stubPath typings is not a valid directory.
[Info  - 7:49:49 PM] Assuming Python version 3.8
[Info  - 7:49:49 PM] Assuming Python platform Darwin
[Info  - 7:49:49 PM] Searching for source files
[Info  - 7:49:49 PM] No source files found.
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (56ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 0ms] (57ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (28ms)
[BG(1)] binding: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/__init__.pyi [fs read 3ms] (74ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/__init__.pyi (14ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 0ms] (12ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (11ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi (9ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi [fs read 0ms] (3ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi (2ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/_asarray.pyi [fs read 1ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/_asarray.pyi (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/__init__.py [fs read 1ms] (11ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/__init__.py (2ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_dtype_like.py [fs read 0ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_dtype_like.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_shape.py [fs read 1ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_shape.py (0ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/abc.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_array_like.py [fs read 1ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_array_like.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_scalars.py [fs read 0ms] (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_scalars.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/linalg/__init__.pyi [fs read 0ms] (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/linalg/__init__.pyi (1ms)
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py ...
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (22ms)
[FG] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 3ms] (57ms)
[FG] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (24ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/circle_fitting.py (1ms)
IntelliCode model /Users/paddyharrison/.vscode/extensions/visualstudioexptteam.vscodeintellicode-1.2.11/cache/E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19
Loading ONNX runtime...
Loaded ONNX runtime. Creating IntelliCode session...
2021-02-11 19:49:52.788055 [I:onnxruntime:, inference_session.cc:174 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true
2021-02-11 19:49:52.790268 [I:onnxruntime:, inference_session.cc:840 Initialize] Initializing session.
2021-02-11 19:49:52.790286 [I:onnxruntime:, inference_session.cc:865 Initialize] Adding default CPU execution provider.
2021-02-11 19:49:52.791908 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-02-11 19:49:52.792569 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-02-11 19:49:52.794586 [V:onnxruntime:, inference_session.cc:679 TransformGraph] Node placements
2021-02-11 19:49:52.794596 [V:onnxruntime:, inference_session.cc:681 TransformGraph] All nodes have been placed on [CPUExecutionProvider].
2021-02-11 19:49:52.794624 [V:onnxruntime:, session_state.cc:71 CreateGraphInfo] SaveMLValueNameIndexMapping
2021-02-11 19:49:52.794678 [V:onnxruntime:, session_state.cc:116 CreateGraphInfo] Done saving OrtValue mappings.
2021-02-11 19:49:52.795431 [I:onnxruntime:, finalize_session_state.cc:173 SaveInitializedTensors] Saving initialized tensors.
2021-02-11 19:49:52.809633 [I:onnxruntime:, finalize_session_state.cc:225 SaveInitializedTensors] Done saving initialized tensors
2021-02-11 19:49:52.812012 [I:onnxruntime:, inference_session.cc:954 Initialize] Session successfully initialized.
Created IntelliCode session.
Background analysis message: setFileClosed
Background analysis message: analyze
Background analysis message: setFileOpened
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (105ms)
[FG] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 2ms] (62ms)
[FG] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (24ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (4ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getSemanticTokens
[BG(1)] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (59ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi [fs read 1ms] (51ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/builtins.pyi (18ms)
[BG(1)] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (5ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/glob.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/glob.pyi (0ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/sys.pyi [fs read 0ms] (5ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/sys.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/os/__init__.pyi [fs read 0ms] (16ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/os/__init__.pyi (6ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/shutil.pyi [fs read 0ms] (3ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/shutil.pyi (3ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/datetime.pyi [fs read 0ms] (9ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/datetime.pyi (3ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/collections/__init__.pyi [fs read 0ms] (8ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/collections/__init__.pyi ...
[BG(1)]   parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_collections_abc.pyi [fs read 0ms] (1ms)
[BG(1)]   binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_collections_abc.pyi (0ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/collections/__init__.pyi (6ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi [fs read 0ms] (10ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/typing.pyi (10ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/logging/__init__.pyi [fs read 0ms] (13ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/logging/__init__.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/re.pyi [fs read 1ms] (3ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/re.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/ncempy/io/__init__.py [fs read 1ms] (4ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/ncempy/io/__init__.py (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/types.pyi [fs read 0ms] (7ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/types.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/Tkinter/__init__.pyi [fs read 1ms] (39ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/Tkinter/__init__.pyi ...
[BG(1)]   parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/tkinter/constants.pyi [fs read 0ms] (3ms)
[BG(1)]   binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/tkinter/constants.pyi (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/Tkinter/__init__.pyi (29ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/__init__.pyi [fs read 0ms] (14ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/__init__.pyi (13ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/__init__.py [fs read 1ms] (9ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/__init__.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/__init__.py [fs read 0ms] (29ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/__init__.py (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/__init__.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/__init__.pyi (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/anchored_artists.py [fs read 1ms] (13ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/mpl_toolkits/axes_grid1/anchored_artists.py (2ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/offsetbox.py [fs read 1ms] (47ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/offsetbox.py (9ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/artist.pyi [fs read 8ms] (8ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/artist.pyi (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/font_manager.py [fs read 1ms] (49ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/font_manager.py (16ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/__init__.py [fs read 1ms] (14ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/__init__.py ...
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/codata.py [fs read 1ms] (20ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/codata.py (1ms)
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/constants.py [fs read 1ms] (9ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/constants.py (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/scipy/constants/__init__.py (32ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_typeshed/__init__.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/abc.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/abc.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/fromnumeric.pyi [fs read 0ms] (4ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/fromnumeric.pyi (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/__init__.py [fs read 0ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/__init__.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_array_like.py [fs read 0ms] (2ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_array_like.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_scalars.py [fs read 0ms] (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_scalars.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_shape.py [fs read 0ms] (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_shape.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_dtype_like.py [fs read 0ms] (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/typing/_dtype_like.py (0ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_importlib_modulespec.pyi [fs read 0ms] (0ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_importlib_modulespec.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/os/path.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/os/path.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/genericpath.pyi [fs read 0ms] (0ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/genericpath.pyi (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/ncempy/io/dm.py [fs read 1ms] (17ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/ncempy/io/dm.py (6ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stubs/typing-extensions/typing_extensions.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/io.pyi [fs read 0ms] (7ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/io.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/mmap.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/mmap.pyi (3ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/__init__.py [fs read 1ms] (6ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/__init__.py ...
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/manage_plugins.py [fs read 1ms] (6ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/manage_plugins.py (2ms)
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/sift.py [fs read 1ms] (2ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/sift.py (0ms)
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/collection.py [fs read 1ms] (21ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/collection.py (3ms)
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/_io.py [fs read 0ms] (8ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/_io.py (2ms)
[BG(1)]   parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/_image_stack.py [fs read 1ms] (1ms)
[BG(1)]   binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/_image_stack.py (0ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/__init__.py (48ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/util.py [fs read 1ms] (7ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/io/util.py (0ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/contextlib.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/contextlib.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/enum.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/enum.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/tempfile.pyi [fs read 0ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/tempfile.pyi (3ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/urllib/parse.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/urllib/parse.pyi (3ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/urllib/request.pyi [fs read 0ms] (13ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/urllib/request.pyi (3ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/ssl.pyi [fs read 0ms] (5ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/ssl.pyi (2ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/color/colorconv.py [fs read 1ms] (12ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/color/colorconv.py (5ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/warnings.pyi [fs read 0ms] (3ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/warnings.pyi (2ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_warnings.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/_warnings.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/__init__.py [fs read 1ms] (4ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/__init__.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/dtype.py [fs read 0ms] (3ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/dtype.py (3ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/_asarray.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/_asarray.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/numerictypes.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/numpy/core/numerictypes.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/pyplot.pyi [fs read 1ms] (49ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/pyplot.pyi (4ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/colors.pyi [fs read 1ms] (2ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/colors.pyi (0ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/figure.pyi [fs read 0ms] (0ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/figure.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/lookfor.py [fs read 1ms] (2ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/util/lookfor.py (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/exposure/__init__.py [fs read 1ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/exposure/__init__.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/exposure/exposure.py [fs read 1ms] (6ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/exposure/exposure.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/_shared/utils.py [fs read 0ms] (5ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/_shared/utils.py (2ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/_shared/_warnings.py [fs read 0ms] (1ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/skimage/_shared/_warnings.py (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/functools.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/typeshed-fallback/stdlib/functools.pyi (1ms)
[BG(1)] parsing: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/patches.pyi [fs read 0ms] (1ms)
[BG(1)] binding: /Users/paddyharrison/.vscode/extensions/ms-python.vscode-pylance-2021.2.2/dist/bundled/stubs/matplotlib/patches.pyi (0ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/fontconfig_pattern.py [fs read 0ms] (5ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/matplotlib/fontconfig_pattern.py (1ms)
[BG(1)] parsing: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/pyparsing.py [fs read 2ms] (71ms)
[BG(1)] binding: /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages/pyparsing.py (28ms)
Background analysis message: getSemanticTokens
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py ...
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (11ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (11ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (21ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (3ms)
Background analysis message: getSemanticTokens
[BG(1)] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (30ms)
[BG(1)] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (3ms)
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py ...
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (2ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (2ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (14ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (6ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (18ms)
[BG(1)] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (2ms)
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (9ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (4ms)
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py ...
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (7ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (7ms)
Background analysis message: resumeAnalysis
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py ...
[BG(1)]   parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (12ms)
[BG(1)]   binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (2ms)
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (14ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (3ms)
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (104ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (118ms)
Background analysis message: getSemanticTokens
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (11ms)
[FG] binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (3ms)
Background analysis message: analyze
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py ...
[BG(1)]   parsing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (13ms)
[BG(1)]   binding: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (1ms)
[BG(1)]   checking: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (273ms)
[BG(1)] analyzing: /Users/paddyharrison/Documents/GitHub/Python/dm3_functions.py (288ms)
Background analysis message: getSemanticTokens
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange

and code --status:

(electron) Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.
Version:          Code 1.53.1 (5d424b828ada08e1eb9f95d6cb41120234ef57c7, 2021-02-08T23:35:15.302Z)
OS Version:       Darwin x64 20.3.0
CPUs:             Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz (16 x 2300)
Memory (System):  16.00GB (4.39GB free)
Load (avg):       2, 2, 2
VM:               0%
Screen Reader:    no
Process Argv:     --crash-reporter-id 128552f9-e223-4ba5-9ba2-01f969690f73
GPU Status:       2d_canvas:                  enabled
                  gpu_compositing:            enabled
                  metal:                      disabled_off
                  multiple_raster_threads:    enabled_on
                  oop_rasterization:          enabled
                  opengl:                     enabled_on
                  protected_video_decode:     unavailable_off
                  rasterization:              enabled
                  skia_renderer:              disabled_off_ok
                  video_decode:               enabled
                  webgl:                      enabled
                  webgl2:                     enabled

CPU %   Mem MB     PID  Process
    1      115   16132  code main
    3       82   16135     gpu-process
    0       33   16137     utility
    5      262   16138     window (dm3_functions.py)
    0      115   16165       extensionHost
    0       33   16170         /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer) /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/json-language-features/server/dist/node/jsonServerMain --node-ipc --clientProcessId=16165
    0      246   16226         electron_node bundle.js 
    0        0   16328       /bin/zsh -l
    1        0   16373       /bin/zsh -l
    0        0   16462         bash /usr/local/bin/code --status
   19       33   16472           electron_node cli.js 
    0      115   16169     shared-process
jakebailey commented 3 years ago

Yes, this is promising:

Search paths found for configured python interpreter:
  /Users/paddyharrison/Documents/GitHub
  /Users/paddyharrison/Documents/GitHub/Python
  /Users/paddyharrison/Documents/GitHub/3D-SPED
  /opt/anaconda3/envs/pyxem/lib/python3.8
  /opt/anaconda3/envs/pyxem/lib/python3.8/lib-dynload
  /opt/anaconda3/envs/pyxem/lib/python3.8/site-packages

Though I am a little concerned by the start of the log where the interpreter fails to work, but that's on a different interpreter than the one I think you are actually using... I think that's some Python extension oddity for the "default" interpreter or something that is quickly changed by a config update.

I'll close this as fixed, then.

harripj commented 3 years ago

I think that may the default path for my work PC (maybe it came in through settings sync?). In any case I think this is not a problem with Pylance, as you said.

Thanks for all of your efforts and help figuring this out!