Repository navigation
[vscode-pytest]: unsupported operand type(s) for +=: 'int' and 'NoneType' #25793
Description
Type: Bug
Behaviour
src/judgingportal/tests/management/test_import_judge_experience.py Plugin error, exception thrown while attempting to send data[vscode-pytest]: unsupported operand type(s) for +=: 'int' and 'NoneType' [vscode-pytest] data: {"jsonrpc": "2.0", "params": {"cwd": "/workspaces/judging-portal", "status": "success", "result": {"/workspaces/judging-portal/src/judgingportal/tests/management/test_import_judge_experience.py::TestImportingJudgeExperience::test_valid_import": {"test": "/workspaces/judging-portal/src/judgingportal/tests/management/test_import_judge_experience.py::TestImportingJudgeExperience::test_valid_import", "outcome": "success", "message": null, "traceback": null, "subtest": null}}, "not_found": null, "error": null}}
Steps to reproduce:
- Click Testing charm
- Run and test (that worked on 1.109)
Diagnostic data
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
- Python 3.12.12
- Django 5.1.x
- pytest
- pytest-django
- pytest-cov
- pytest-mock
- pytest-lazy-fixtures
- pytest-playwright
- pytest-factoryboy
Extension version: 2026.0.0
VS Code version: Code 1.109.2 (591199df409fbf59b4b52d5ad4ee0470152a9b31, 2026-02-10T20:18:23.520Z)
OS version: Darwin arm64 24.6.0
Modes:
Remote OS version: Linux arm64 6.12.67-linuxkit
Remote OS version: Linux arm64 6.12.67-linuxkit
Remote OS version: Linux arm64 6.12.67-linuxkit
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Max (10 x 2400) |
| GPU Status | 2d_canvas: enabled GPU0: VENDOR= 0x106b [Google Inc. (Apple)], DEVICE=0x0000 [ANGLE (Apple, ANGLE Metal Renderer: Apple M1 Max, Version 15.7.3 (Build 24G419))], DRIVER_VENDOR=Apple, DRIVER_VERSION=15.7.3 ACTIVE Machine model name: MacBookPro Machine model version: 18.2 direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_graphite: disabled_off trees_in_viz: disabled_off video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled webgpu: enabled webnn: disabled_off |
| Load (avg) | 14, 14, 16 |
| Memory (System) | 64.00GB (0.08GB free) |
| Process Argv | --crash-reporter-id b13dd931-c2c6-4083-ab16-9836c66fadfd |
| Screen Reader | no |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | Dev Container: real-time.com Ansible Playbooks @ desktop-linux |
| OS | Linux arm64 6.12.67-linuxkit |
| CPUs | unknown (10 x 0) |
| Memory (System) | 7.75GB (0.55GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | Dev Container: comap.com Judging Portal @ desktop-linux |
| OS | Linux arm64 6.12.67-linuxkit |
| CPUs | unknown (10 x 0) |
| Memory (System) | 7.75GB (0.55GB free) |
| VM | 0% |
| Item | Value |
|---|---|
| Remote | Dev Container: comap.com Contest Portal @ desktop-linux |
| OS | Linux arm64 6.12.67-linuxkit |
| CPUs | unknown (10 x 0) |
| Memory (System) | 7.75GB (0.55GB free) |
| VM | 0% |
A/B Experiments
vsliv368:30146709
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
6518g693:31436602
aj953862:31281341
6abeh943:31336334
envsactivate1:31353494
cloudbuttont:31379625
3efgi100_wstrepl:31403338
use-responses-api:31390855
anonusage:31403420
je187915:31401257
ec5jj548:31422691
cmp-ext-treat:31426748
cp_cls_t_966_ss:31454198
ge8j1254_inline_auto_hint_haiku:31431912
nes-autoexp-10:31446583
a5gib710:31434435
2984c849_gpt52_codex:31457542
rename_enabled:31436409
7a04d226_do_not_restore_last_panel_session:31438103
anthropic_thinking_t:31457101
722j7530_gpt_5_2_codex:31458091
preserve_tokens:31444547
cp_cls_c_1081:31454833
copilot-nes-oct-trt:31432596
ia-use-proxy-models-svc:31452481
nes-slash-models-on:31441832
nes-set-to-on:31441941
a43f0576c:31442824
e9c30283:31461165
c0ci8992_validated:31449878
edit_mode_hidden:31459179
864ei723_large_tool_results_to_disk:31460878
reg-2ge67640:31455970
nes-extended-on:31455476
chat:31457767
ah:31460422
Activity
basictheprogram commentedon Feb 12, 2026
I can squelch the message with
.vscode/settings.jsoneleanorjboyd commentedon Feb 12, 2026
Hi! Thanks for the issue this is a weird one-
Is this reproducible every time, or intermittent?
What was the previous extension version that worked?
is
python.useEnvironmentsExtensionenabled in settings? Does toggling it change anything?Can you reproduce with a minimal test file and all other pytest plugins disabled?
basictheprogram commentedon Feb 12, 2026
reproducible every time
I did not upgrade the Python extension myself, manually. But the extension has the
Auto Updatechecked.I do run this in a devcontainer and current Python extension is 2026.0.0 I do not know what release was working before things broke.
All I know is I was on vscode 1.109 before the recommend upgrade was applied.
My .vscode/settings.json, I just added (Feb 12) the
-v, -p no:vscode_pytestto get some functionality back.{ // General Editor Settings "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, // Python Interpreter and Testing "python.defaultInterpreterPath": "/home/vscode/.venv/bin/python", "python.experiments.enabled": false, "python.testing.autoTestDiscoverOnSaveEnabled": true, "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestPath": "/home/vscode/.venv/bin/pytest", "python.testing.pytestArgs": [ "-v", "-p", "no:vscode_pytest" ], "python.testing.cwd": "${workspaceFolder}", // Terminal - Use Bash "terminal.integrated.defaultProfile.linux": "bash", "terminal.integrated.fontSize": 15, "terminal.integrated.profiles.linux": { "bash": { "path": "/bin/bash" } }, // Language-specific Editor Configurations "[python]": { "editor.tabSize": 4, "editor.formatOnSave": false, "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.fixAll.ruff": "explicit", "source.organizeImports": "explicit", } }, "[dockercompose]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.autoIndent": "advanced", "editor.formatOnSave": true, "editor.defaultFormatter": "redhat.vscode-yaml", "editor.quickSuggestions": { "other": true, "comments": false, "strings": true } }, "[dockerfile]": { "editor.formatOnSave": true, "editor.defaultFormatter": "ms-azuretools.vscode-docker" }, "[github-actions-workflow]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.autoIndent": "advanced", "editor.formatOnSave": true, "editor.defaultFormatter": "redhat.vscode-yaml", "editor.quickSuggestions": { "other": true, "comments": false, "strings": true } }, "[json]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.defaultFormatter": "vscode.json-language-features" }, "[jsonc]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.defaultFormatter": "vscode.json-language-features" }, "[toml]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.formatOnSave": true, "editor.defaultFormatter": "tamasfe.even-better-toml" }, "[yaml]": { "editor.tabSize": 4, "editor.insertSpaces": true, "editor.autoIndent": "advanced", "editor.formatOnSave": true, "editor.defaultFormatter": "redhat.vscode-yaml" }, "python-envs.pythonProjects": [ { "path": "", "envManager": "ms-python.python:venv", "packageManager": "ms-python.python:pip" } ], "[git-commit]": { "rewrap.wrappingColumn": 72 }, }I added
"python.useEnvironmentsExtension": trueand I still get the errorI can duplicate the behavior with:
Minimal test with plugins enabled
Test Results console
Bellow is the "test nothing" test suite similar to the real test suite.
The "test nothing" tests all passes all tests.
The first test in real test suite test_valid_import() still throws the
unsupported operand type(s) for +=: 'int' and 'NoneType'error.The "testing nothing" test_call_command() is similar to test_valid_import().
The "test nothing" test suite, run with all plugins active.
Test Result console
Could imports or pytest fixtures cause the problem? The "testing nothing" test suite hints at "no".
Here is the skeleton of the real test suite.
And the Test Results console
eleanorjboyd commentedon Feb 17, 2026
great this helps me figure it out- it is a dup of #24811. Copilot is telling me this is actually fixable (closed the other as not fixable). Worth exploring but I do not have the bandwidth right now. If you have any interest putting in a fix feel free to investigate and send me a PR!
github-actions commentedon Apr 13, 2026
Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.
Happy Coding!