Skip to content

visualstudio_py_testlauncher.py - format_exception() missing 3 required positional arguments: 'etype', 'value', and 'tb' #3305

Closed

Description

I got an exception while trying to debug a unittest. The exception was from a bug in VSCode Python extension itself:

Exception has occurred: TypeError
format_exception() missing 3 required positional arguments: 'etype', 'value', and 'tb'
  File "C:\Users\Ark\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\PythonTools\visualstudio_py_testlauncher.py", line 344, in main
    pass
  File "C:\Users\Ark\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\PythonTools\visualstudio_py_testlauncher.py", line 347, in <module>
    main()

I looked at the extension's code and the error is correct. See DonJayamanne@3e50a68#r31258938

Environment data

  • VS Code version: 1.28.2
  • Extension version: 2018-10-01
  • OS and version: Windows 10
  • Python version: 3.7.0 x64
  • Type of virtual environment used: N/A

Actual behavior

Exception has occurred: TypeError
format_exception() missing 3 required positional arguments: 'etype', 'value', and 'tb'
  File "C:\Users\Ark\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\PythonTools\visualstudio_py_testlauncher.py", line 344, in main
    pass
  File "C:\Users\Ark\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\PythonTools\visualstudio_py_testlauncher.py", line 347, in <module>
    main()

Expected behavior

No exception

Activity

  1. VCPintoHUUB commented on Feb 5, 2019

    @VCPintoHUUB

    Hi,
    Any workaround for this bug?
    Will it be fixed?

  2. VCPintoHUUB commented on Apr 1, 2019

    @VCPintoHUUB

    Hi,
    Any hope on seeing this fixed?

  3. brettcannon commented on Jul 24, 2020

    @brettcannon
    Member

    We are going through old issues and we noticed that no one had replied to this issue. I want to apologize for the oversight and to let you know that the issue was triaged (as shown by the labels applied to this issue).

  4. eleanorjboyd commented on Oct 30, 2023

    @eleanorjboyd
    Member

    Hello! I have reviewed this issue and given the architectural changes of the testing rewrite, this issue should no longer exist on the rewrite. Therefore I am going to close this issue but please comment or open a new issue if you are still seeing a problem when you try this yourself!

    To use the rewrite yourself just add ”python.experiments.optInto": ["pythonTestAdapter"] to your user settings. You can confirm you have the rewrite enabled by setting your log level to trace, via the Developer: Set Log Level command in the command palette. Then check to see if Experiment 'pythonTestAdapter' is active is in your python logs.

    Thanks!

  5. locked as resolved and limited conversation to collaborators on Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions