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

Unable to restart tests (KeyError: 'params') #23396

Closed
andybbruno opened this issue May 9, 2024 · 4 comments · Fixed by #23397
Closed

Unable to restart tests (KeyError: 'params') #23396

andybbruno opened this issue May 9, 2024 · 4 comments · Fixed by #23397
Assignees
Labels
area-testing triage-needed Needs assignment to the proper sub-team

Comments

@andybbruno
Copy link

andybbruno commented May 9, 2024

Type: Bug


Traceback (most recent call last):
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/runpy.py", line 198, in _run_module_as_main
    return _run_code(code, main_globals, None,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.9/Frameworks/Python.framework/Versions/3.11/lib/python3.11/runpy.py", line 88, in _run_code
    exec(code, run_globals)
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/Users/andreabruno/.vscode/extensions/ms-python.debugpy-2024.6.0-darwin-arm64/bundled/libs/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/Users/andreabruno/.vscode/extensions/ms-python.python-2024.6.0/python_files/vscode_pytest/run_pytest_script.py", line 62, in <module>
    test_ids_from_buffer = raw_json["params"]
                           ~~~~~~~~^^^^^^^^^^
KeyError: 'params'

When I try to restart tests I get the error described above.

Version: 1.89.0 (Universal)
Commit: b58957e67ee1e712cebf466b995adf4c5307b2bd
Date: 2024-05-01T02:10:10.196Z (1 wk ago)
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.3.0

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label May 9, 2024
@andybbruno
Copy link
Author

An easy fix would be the following:

test_ids_from_buffer = raw_json.get("params")

@eleanorjboyd
Copy link
Member

Thank you so much! Great catch. I am trying to consider the scenarios were there are no test cases sent- just so I make sure we are doing it right. You said you restarted tests? Like you were in the debugger and restarted or did you use the command rerun tests? I just want to make sure I have this scenario covered in my tests

@github-actions github-actions bot added the info-needed Issue requires more information from poster label May 9, 2024
@andybbruno
Copy link
Author

You said you restarted tests? Like you were in the debugger and restarted or did you use the command rerun tests? I just want to make sure I have this scenario covered in my tests

Hi @eleanorjboyd 👋
Yes I was in the debugger and I tried to restart tests using the Restart button. My apologies for not providing any tests in my PR, but I didn't know where to start from.

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label May 10, 2024
anthonykim1 pushed a commit to anthonykim1/vscode-python that referenced this issue May 10, 2024
@eleanorjboyd
Copy link
Member

No worries!! Thank you for the PR. I was only asking so I could improve things, the tests are very hard to configure and the code change was small so it is best to get it fixed!

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

Successfully merging a pull request may close this issue.

2 participants