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

Resurfaced Bug: Cannot read properties of null (reading 'testsuites') #19367

Closed
adam-grant-hendry opened this issue Jun 26, 2022 · 1 comment
Closed
Labels
triage-needed Needs assignment to the proper sub-team

Comments

@adam-grant-hendry
Copy link

adam-grant-hendry commented Jun 26, 2022

Issue Type: Bug

Behaviour

For some reason, Issue #14107 has resurfaced.

Expected vs. Actual

Expected: Testing for python works and Output tab has better debug information.

Actual: Testing does not run and Output tab does not provide information that can be used to debug problem.

Steps to reproduce:

  1. git clone the pyvistaqt repo, pip install the requirements_*.txt files, and do local editable install py -m pip install -e .
  2. Run tests to ensure all is well (Tests run in both terminal and Test Explorer)
  3. Install pytest-mypy-plugins and run tests (Tests run in both terminal and Test Explorer)
  4. Install pytest-mypy-testing and run tests, but tests now no longer run in terminal nor Test Explorer
  • Uninstalling pytest-mypy-testing does not solve problem
  • Uninstalling and reinstalling venv and dependencies does not solve problem
  • Deleting all pytest cache folders does not solve problem

Running pytest in terminal simply outputs

================================== test session starts ========================================
platform win32 -- Python 3.8.10, pytest-7.1.2, pluggy-1.0.0
PySide6 6.3.1 -- Qt runtime 6.3.1 -- Qt compiled 6.3.1
rootdir: C:\Users\hendra11\Code\external\pyvistaqt, configfile: pytest.ini                                                                                                                                                                                     
plugins: cov-3.0.0, memprof-0.2.0, mypy-plugins-1.9.3, qt-4.1.0, sphinx-0.4.0
collected 42 items
                                                                                                                                                                                                                                         
tests\test_plotting.py

i.e. testing won't run, and the Test Explorer output window shows:

Running tests (pytest): %USERPROFILE%\Code\external\pyvistaqt
Running test with arguments: --rootdir %USERPROFILE%\Code\external\pyvistaqt --override-ini junit_family=xunit1 --junit-xml=%LOCALAPPDATA%\Temp\tmp-47320qoETK7OKy2kS.xml
Current working directory: %USERPROFILE%\Code\external\pyvistaqt
Workspace directory: %USERPROFILE%\Code\external\pyvistaqt
Run completed, parsing output
Error while running tests: pyvistaqt
TypeError: Cannot read properties of null (reading 'testsuites')

Error while running tests:
TypeError: Cannot read properties of null (reading 'testsuites')

Finished running tests!

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.10 x64-bit (CPython)
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Running tests (pytest): %USERPROFILE%\Code\external\pyvistaqt
Running test with arguments: --rootdir %USERPROFILE%\Code\external\pyvistaqt --override-ini junit_family=xunit1 --junit-xml=%LOCALAPPDATA%\Temp\tmp-47320qoETK7OKy2kS.xml
Current working directory: %USERPROFILE%\Code\external\pyvistaqt
Workspace directory: %USERPROFILE%\Code\external\pyvistaqt
Run completed, parsing output
Error while running tests: pyvistaqt
TypeError: Cannot read properties of null (reading 'testsuites')

Error while running tests:
TypeError: Cannot read properties of null (reading 'testsuites')

Finished running tests!


> Test run finished at 6/26/2022, 2:14:48 PM <

User Settings


languageServer: "Pylance"

linting
• flake8Enabled: true
• flake8Path: "${workspaceFolder}/.venv/Scripts/flake8.exe"
• mypyArgs: [
    "--config-file",
    "mypy.ini"
]
• mypyEnabled: true
• mypyPath: "${workspaceFolder}/.venv/Scripts/mypy.exe"
• pylintPath: "${workspaceFolder}/.venv/Scripts/pylint.exe"

formatting
• provider: "black"
• blackArgs:
line-length = 72
skip-string-normalization = true
target-version = ["py38"]
exclude='\.eggs|\.git|\.mypy_cache|\.tox|\.venv|_build|buck-out|build|dist|node_modules'

testing
• pytestArgs:
junit_family=legacy
filterwarnings =
    error
    ignore::ResourceWarning
    # bogus numpy ABI warning (see numpy/#432)
    ignore:.*numpy.dtype size changed.*:RuntimeWarning
    ignore:.*numpy.ufunc size changed.*:RuntimeWarning
    # from usage of numpy_to_vtk:
    ignore:.*`np.bool` is a deprecated alias.*:DeprecationWarning
    ignore:.*`np.int` is a deprecated alias.*:DeprecationWarning
    ignore:.*`np.float` is a deprecated alias.*:DeprecationWarning
    ignore:.*`np.object` is a deprecated alias.*:DeprecationWarning
    ignore:.*`np.long` is a deprecated alias:DeprecationWarning
    ignore:.*Converting `np\.character` to a dtype is deprecated.*:DeprecationWarning
addopts =
    --mypy-ini-file mypy_test.ini
• pytestEnabled: true
• pytestPath: "${workspaceFolder}/.venv/Scripts/pytest.exe"

VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:48:58.283Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz (48 x 2993)
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
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 190.65GB (148.69GB free)
Process Argv --crash-reporter-id 9e9db912-c31c-4be1-8c40-4080829b5095
Screen Reader no
VM 0%
Extensions (114)
Extension Author (truncated) Version
html-snippets abu 0.2.1
arepl alm 2.0.3
preview-pdf ana 1.0.0
vscode-color ans 0.4.5
toml be5 0.6.0
vscode-icontheme-nomo-dark be5 1.3.6
github-markdown-preview bie 0.3.0
markdown-checkbox bie 0.3.2
markdown-emoji bie 0.2.1
markdown-footnotes bie 0.0.7
markdown-mermaid bie 1.14.2
markdown-preview-github-styles bie 1.0.1
markdown-yaml-preamble bie 0.1.0
mermaid-markdown-syntax-highlighting bpr 1.3.0
htmltagwrap bra 0.0.7
better-toml bun 0.3.2
path-intellisense chr 2.8.1
js-codeformer cms 2.6.1
gitignore cod 0.7.0
doxdocgen csc 1.4.0
vscode-markdownlint Dav 0.47.0
githistory don 0.6.19
vscode-pandoc Dou 0.0.8
vscode-html-css ecm 1.13.0
replacequotes eda 0.0.1
grammarly-plus Edi 0.1.6
markdown-table-formatter fcr 2.2.4
code-runner for 0.11.8
graphviz-markdown-preview gee 0.0.8
html-snippets gey 0.2.3
gitlab-workflow Git 3.47.2
gc-excelviewer Gra 4.2.55
language-cython guy 0.0.7
live-html-previewer hdg 0.3.0
markdown-table-maker hel 1.0.3
beautify Hoo 1.5.0
output-colorizer IBM 0.1.2
innosetup idl 1.6.1
nsis idl 3.51.1
pynsist idl 0.11.1
vscode-cython-annotate ita 0.1.6
vscode-picture Jak 1.0.0
better-cpp-syntax jef 1.15.18
nbpreviewer jit 1.2.2
vscode-graphviz joa 0.0.6
vscode-peacock joh 4.0.1
cmake-language-support-vscode jos 0.0.4
vscode-colorize kam 0.11.1
markdown-math koe 0.1.0
tag-inserter l7s 1.4.0
python-sphinx-highlight leo 0.2.0
restructuredtext lex 189.0.0
quickstart lol 0.1.0
csvtomarkdown mar 0.0.1
mypy mat 0.2.2
vscode-3dviewer md2 1.0.0
markdown-shortcuts mdi 0.12.0
rainbow-csv mec 2.4.0
git-graph mhu 1.30.0
vscode-docker ms- 1.22.0
vscode-dotnet-runtime ms- 1.5.0
python ms- 2022.8.0
vscode-pylance ms- 2022.6.30
jupyter ms- 2022.5.1001601848
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.8
remote-containers ms- 0.238.2
remote-ssh ms- 0.82.1
remote-ssh-edit ms- 0.80.0
remote-wsl ms- 0.66.3
cmake-tools ms- 1.11.26
cpptools ms- 1.11.0
cpptools-extension-pack ms- 1.2.0
makefile-tools ms- 0.5.0
powershell ms- 2022.6.1
test-adapter-converter ms- 0.1.6
text-emoji Naz 1.1.3
pytest-fixtures nic 0.2.2
autodocstring njp 0.6.1
emoji Per 1.0.1
vscode-versionlens pfl 1.0.10
material-icon-theme PKi 4.18.1
polacode pnp 0.3.4
vscode-xml red 0.20.0
vscode-yaml red 1.8.0
prettier-now rem 1.4.9
vscode-sort-json ric 1.20.0
vscode-json-validate rio 1.4.3
trailing-spaces sha 0.3.1
markdown-preview-enhanced shd 0.6.3
vscode-table-formatter shu 1.2.1
html5-boilerplate sid 1.1.1
prettier-vscode Sim 2.0.7
vscode-dicom smi 1.4.0
code-spell-checker str 2.2.5
code-spell-checker-medical-terms str 1.0.15
code-spell-checker-scientific-terms str 0.1.5
ejs-snippets Tao 0.1.0
ayu tea 1.0.5
html-preview-vscode tht 0.2.5
shellcheck tim 0.19.5
simple-rst tro 1.5.2
cmake twx 0.0.17
tiff-preview uco 0.0.1
vscode-choosealicense ult 0.7.0
errorlens use 3.5.1
vscode-icons vsc 11.12.0
gitblame wad 8.2.3
HTML5-extension-pack wal 1.0.0
vscode-todo-highlight way 1.0.5
extension-manager web 0.0.5
markdown-pdf yza 1.4.4
markdown-all-in-one yzh 3.4.3
grammarly znc 0.23.6

(3 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdc:30486549

Extension version: 2022.8.0
VS Code version: Code 1.68.1 (30d9c6cd9483b2cc586687151bcbcd635f373630, 2022-06-14T12:48:58.283Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Xeon(R) Gold 6248R CPU @ 3.00GHz (48 x 2993)
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
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 190.65GB (148.69GB free)
Process Argv --crash-reporter-id 9e9db912-c31c-4be1-8c40-4080829b5095
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593:30376534
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdc:30486549

@adam-grant-hendry
Copy link
Author

I discovered that the bug has not resurfaced. Instead, the behavior is due to an elusive bug within the pytest-qt library. For more details, please see the following issue:

BUG: Multiple PyQt/PySide Versions Not Supported #437

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

1 participant