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 import collections.abc for python 3.13 despite the interpretor running correctly #584

Closed
alexanderthiem opened this issue Dec 12, 2024 · 1 comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.

Comments

@alexanderthiem
Copy link

Diagnostic Data

  • Python version (& distribution if applicable, e.g., Anaconda): python 3.13.1
  • Type of virtual environment used (e.g., conda, venv, virtualenv, etc.): None
  • Operating system (and version): windows10
  • Version of tool extension you are using: 2024.0.0

Behaviour

Expected Behavior

No error on collections.abc

Actual Behavior

Unable to import Collections.abs

Reproduction Steps:

literally installing the newest version of python from scratch, reinstalling the extensions and tiping:
import collections.abc
there are even autocomplete and module information (though that could be pylance)
collections.abc seems to be the only library where it doesnt work.

Logs:

Click here for detailed logs 2024-12-12 08:44:10.536 [info] [Trace - 8:44:10 AM] Sending notification 'textDocument/didSave'. 2024-12-12 08:44:10.536 [info] Params: { "textDocument": { "uri": "file:///c%3A/Users/alexanderthiem/Documents/Visual_Code%20Projects/AOC/temp.py" } }

2024-12-12 08:44:10.545 [info] [Trace - 8:44:10 AM] Received notification 'window/logMessage'.
2024-12-12 08:44:10.545 [info] Params: {
"type": 4,
"message": "c:\Users\alexanderthiem\AppData\Local\Programs\Python\Python313\python.exe -m pylint --reports=n --output-format=json --clear-cache-post-run=y --from-stdin c:\Users\alexanderthiem\Documents\Visual_Code Projects\AOC\temp.py"
}

2024-12-12 08:44:10.546 [info] c:\Users\alexanderthiem\AppData\Local\Programs\Python\Python313\python.exe -m pylint --reports=n --output-format=json --clear-cache-post-run=y --from-stdin c:\Users\alexanderthiem\Documents\Visual_Code Projects\AOC\temp.py
2024-12-12 08:44:10.547 [info] [Trace - 8:44:10 AM] Received notification 'window/logMessage'.
2024-12-12 08:44:10.547 [info] Params: {
"type": 4,
"message": "CWD Linter: c:\Users\alexanderthiem\Documents\Visual_Code Projects\AOC"
}

2024-12-12 08:44:10.548 [info] CWD Linter: c:\Users\alexanderthiem\Documents\Visual_Code Projects\AOC
2024-12-12 08:44:11.501 [info] [Trace - 8:44:11 AM] Received notification 'window/logMessage'.
2024-12-12 08:44:11.501 [info] Params: {
"type": 4,
"message": "file:///c%3A/Users/alexanderthiem/Documents/Visual_Code%20Projects/AOC/temp.py :\r\n[\n {\n "type": "convention",\n "module": "temp",\n "obj": "",\n "line": 1,\n "column": 0,\n "endLine": null,\n "endColumn": null,\n "path": "temp.py",\n "symbol": "missing-module-docstring",\n "message": "Missing module docstring",\n "message-id": "C0114"\n },\n {\n "type": "error",\n "module": "temp",\n "obj": "",\n "line": 1,\n "column": 0,\n "endLine": 1,\n "endColumn": 22,\n "path": "temp.py",\n "symbol": "import-error",\n "message": "Unable to import 'collections.abc'",\n "message-id": "E0401"\n },\n {\n "type": "warning",\n "module": "temp",\n "obj": "",\n "line": 1,\n "column": 0,\n "endLine": 1,\n "endColumn": 22,\n "path": "temp.py",\n "symbol": "unused-import",\n "message": "Unused import collections.abc",\n "message-id": "W0611"\n }\n]\n"
}

2024-12-12 08:44:11.501 [info] file:///c%3A/Users/alexanderthiem/Documents/Visual_Code%20Projects/AOC/temp.py :
[
{
"type": "convention",
"module": "temp",
"obj": "",
"line": 1,
"column": 0,
"endLine": null,
"endColumn": null,
"path": "temp.py",
"symbol": "missing-module-docstring",
"message": "Missing module docstring",
"message-id": "C0114"
},
{
"type": "error",
"module": "temp",
"obj": "",
"line": 1,
"column": 0,
"endLine": 1,
"endColumn": 22,
"path": "temp.py",
"symbol": "import-error",
"message": "Unable to import 'collections.abc'",
"message-id": "E0401"
},
{
"type": "warning",
"module": "temp",
"obj": "",
"line": 1,
"column": 0,
"endLine": 1,
"endColumn": 22,
"path": "temp.py",
"symbol": "unused-import",
"message": "Unused import collections.abc",
"message-id": "W0611"
}
]

2024-12-12 08:44:11.503 [info] [Trace - 8:44:11 AM] Received notification 'textDocument/publishDiagnostics'.
2024-12-12 08:44:11.503 [info] Params: {
"uri": "file:///c%3A/Users/alexanderthiem/Documents/Visual_Code%20Projects/AOC/temp.py",
"diagnostics": [
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 0
}
},
"message": "Missing module docstring",
"severity": 3,
"code": "C0114:missing-module-docstring",
"codeDescription": {
"href": "https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/missing-module-docstring.html"
},
"source": "Pylint"
},
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 22
}
},
"message": "Unable to import 'collections.abc'",
"severity": 1,
"code": "E0401:import-error",
"codeDescription": {
"href": "https://pylint.readthedocs.io/en/latest/user_guide/messages/error/import-error.html"
},
"source": "Pylint"
},
{
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 0,
"character": 22
}
},
"message": "Unused import collections.abc",
"severity": 2,
"code": "W0611:unused-import",
"codeDescription": {
"href": "https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/unused-import.html"
},
"source": "Pylint"
}
]
}

@alexanderthiem alexanderthiem added the bug Issue identified by VS Code Team member as probable bug label Dec 12, 2024
@github-actions github-actions bot added the triage-needed Issue is not triaged. label Dec 12, 2024
@alexanderthiem
Copy link
Author

pylint-dev/pylint#10112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug triage-needed Issue is not triaged.
Projects
None yet
Development

No branches or pull requests

1 participant