-
Notifications
You must be signed in to change notification settings - Fork 45
Closed as not planned
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtriage-neededIssue is not triaged.Issue is not triaged.
Description
Diagnostic Data
- Python version (& distribution if applicable, e.g., Anaconda): 3.9.0
black, 25.1.0 (compiled: yes)
Python (CPython) 3.9.0 - Type of virtual environment used (e.g., conda, venv, virtualenv, etc.): conda
- Operating system (and version): 22.04.3 LTS (Jammy Jellyfish)
- Version of tool extension you are using: v2025.2.0
Behaviour
Expected Behavior
format code
Actual Behavior
error
Reproduction Steps:
format python documents
Logs:
2025-03-19 13:55:53.754 [info] CWD formatter: /data/workspace/agent-framework
2025-03-19 13:55:53.794 [info] [Error - 1:55:53 PM] Traceback (most recent call last):
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_server.py", line 604, in _run_tool
result = utils.run_module(
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_utils.py", line 171, in run_module
return _run_module(module, argv, use_stdin, source)
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_utils.py", line 158, in _run_module
runpy.run_module(module, run_name="__main__")
File "/data/miniconda3/lib/python3.9/runpy.py", line 206, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/data/miniconda3/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/data/miniconda3/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/__init__.py", line 33, in <module>
from black.comments import normalize_fmt_off
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/comments.py", line 8, in <module>
from black.nodes import (
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/nodes.py", line 19, in <module>
from blib2to3 import pygram
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pygram.py", line 11, in <module>
from .pgen2 import driver
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/driver.py", line 35, in <module>
from . import grammar, parse, pgen, token, tokenize
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/parse.py", line 135, in <module>
class Parser:
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/parse.py", line 165, in Parser
def __init__(self, grammar: Grammar, convert: Optional[Convert] = None) -> None:
File "/data/miniconda3/lib/python3.9/typing.py", line 243, in inner
return func(*args, **kwds)
File "/data/miniconda3/lib/python3.9/typing.py", line 316, in __getitem__
return self._getitem(self, parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 433, in Optional
return Union[arg, type(None)]
File "/data/miniconda3/lib/python3.9/typing.py", line 243, in inner
return func(*args, **kwds)
File "/data/miniconda3/lib/python3.9/typing.py", line 316, in __getitem__
return self._getitem(self, parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 421, in Union
parameters = _remove_dups_flatten(parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 215, in _remove_dups_flatten
all_params = set(params)
TypeError: unhashable type: 'list'
2025-03-19 13:55:53.794 [info] Error while detecting black version:
Traceback (most recent call last):
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_server.py", line 302, in _update_workspace_settings_with_version_info
result = _run_tool(["--version"], copy.deepcopy(settings))
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_server.py", line 604, in _run_tool
result = utils.run_module(
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_utils.py", line 171, in run_module
return _run_module(module, argv, use_stdin, source)
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/tool/lsp_utils.py", line 158, in _run_module
runpy.run_module(module, run_name="__main__")
File "/data/miniconda3/lib/python3.9/runpy.py", line 206, in run_module
mod_name, mod_spec, code = _get_module_details(mod_name)
File "/data/miniconda3/lib/python3.9/runpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/data/miniconda3/lib/python3.9/runpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/__init__.py", line 33, in <module>
from black.comments import normalize_fmt_off
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/comments.py", line 8, in <module>
from black.nodes import (
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/black/nodes.py", line 19, in <module>
from blib2to3 import pygram
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pygram.py", line 11, in <module>
from .pgen2 import driver
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/driver.py", line 35, in <module>
from . import grammar, parse, pgen, token, tokenize
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/parse.py", line 135, in <module>
class Parser:
File "/root/.vscode-server/extensions/ms-python.black-formatter-2025.2.0/bundled/libs/blib2to3/pgen2/parse.py", line 165, in Parser
def __init__(self, grammar: Grammar, convert: Optional[Convert] = None) -> None:
File "/data/miniconda3/lib/python3.9/typing.py", line 243, in inner
return func(*args, **kwds)
File "/data/miniconda3/lib/python3.9/typing.py", line 316, in __getitem__
return self._getitem(self, parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 433, in Optional
return Union[arg, type(None)]
File "/data/miniconda3/lib/python3.9/typing.py", line 243, in inner
return func(*args, **kwds)
File "/data/miniconda3/lib/python3.9/typing.py", line 316, in __getitem__
return self._getitem(self, parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 421, in Union
parameters = _remove_dups_flatten(parameters)
File "/data/miniconda3/lib/python3.9/typing.py", line 215, in _remove_dups_flatten
all_params = set(params)
TypeError: unhashable type: 'list'
Outcome When Attempting Debugging Steps:
Did running it from the command line work?
Extra Details
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bugtriage-neededIssue is not triaged.Issue is not triaged.