You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImportError: cannot import name 'Str' from 'ast' (C:\Users\SOMEUSER\AppData\Local\Programs\Python\Python314\Lib\ast.py)
2025-10-12 16:02:59.162 [info] [Error - 4:02:59 PM] Server initialization failed.
2025-10-12 16:02:59.162 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-10-12 16:02:59.162 [info] [Error - 4:02:59 PM] The isort server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2025-10-12 16:02:59.162 [info] [Error - 4:02:59 PM] isort client: couldn't create connection to server.
2025-10-12 16:02:59.162 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-10-12 16:02:59.163 [info] [Error - 4:02:59 PM] Restarting server failed
2025-10-12 16:02:59.163 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-11-10 10:08:29.335 [info] [Error - 10:08:29 AM] Restarting server failed
2025-11-10 10:08:29.335 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-11-10 10:08:30.299 [info] Traceback (most recent call last):
2025-11-10 10:08:30.299 [info] File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\tool\lsp_server.py", line 42, in <module>
from pygls import server, uris, workspace
File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\libs\pygls\server.py", line 27, in <module>
from pygls.lsp import ConfigCallbackType, ShowDocumentCallbackType
File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\libs\pygls\lsp\__init__.py", line 36, in <module>
from typeguard import check_type
File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\libs\typeguard\__init__.py", line 12, in <module>
from ._decorators import typechecked as typechecked
File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\libs\typeguard\_decorators.py", line 13, in <module>
from ._transformer import TypeguardTransformer
File "c:\Users\DanCollins\.windsurf\extensions\ms-python.isort-2023.11.0-dev-universal\bundled\libs\typeguard\_transformer.py", line 5, in <module>
from ast import (
...<48 lines>...
)
2025-11-10 10:08:30.299 [info] ImportError: cannot import name 'Str' from 'ast' (c:\Users\DanCollins\.conda\envs\sbp\Lib\ast.py)
2025-11-10 10:08:30.387 [info] [Error - 10:08:30 AM] Server initialization failed.
2025-11-10 10:08:30.387 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-11-10 10:08:30.387 [info] [Error - 10:08:30 AM] The isort server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
2025-11-10 10:08:30.387 [info] [Error - 10:08:30 AM] isort client: couldn't create connection to server.
2025-11-10 10:08:30.387 [info] Message: Pending response rejected since connection got disposed
Code: -32097
2025-11-10 10:08:30.387 [info] [Error - 10:08:30 AM] Restarting server failed
2025-11-10 10:08:30.387 [info] Message: Pending response rejected since connection got disposed
Code: -32097
I found ast.Str was deprecated back in Python 3.8, warnings added in Python 3.12 and then removed for Python. 3.14: python/cpython#119563. I also see the docs have a task to be updated: python/cpython#137063
Activity
dancollins commentedon Nov 9, 2025
Similar issue here:
And error logs:
I found
ast.Strwas deprecated back in Python 3.8, warnings added in Python 3.12 and then removed for Python. 3.14: python/cpython#119563. I also see the docs have a task to be updated: python/cpython#137063sameerdhoot commentedon Nov 20, 2025
I have similar issues. Python 3.14.0, OS: Windows 11, IDE: Cursor
monokal commentedon Dec 5, 2025
Confirmed via the ms-python.isort extension for VSCode/Cursor too.