[CDB] ModuleNotFoundError: No module named 'typing'
-
I use Qt Creator 19.0.2 portable build (qtcreator-windows-x64-msvc-19.0.2.7z). I copied qtcreatorcdbext contents to <Qt folder>/lib. When I launch qt creator start debugging and stop on breakpoint I get
[CDB] DEBUG: 5:sys.path.insert(1, '...\\QtCreator-19.0.2.7\\share\\qtcreator\\debugger') [CDB] DEBUG: 6:from cdbbridge import Dumper [CDB] Traceback (most recent call last): [CDB] File "<string>", line 1, in <module> [CDB] File "...\QtCreator-19.0.2.7\share\qtcreator\debugger\cdbbridge.py", line 4, in <module> [CDB] import inspect [CDB] File "D:/a/qt-creator/qt-creator/build/build-qtcreatorcdbext/x64-bld-prefix/src/x64-bld-build/python-lib\inspect.py", line 163, in <module> [CDB] ModuleNotFoundError: No module named 'typing' [CDB] DEBUG: 7:print(dir()) [CDB] ['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'cdbext', 'sys'] [CDB] DEBUG: 8:theDumper = Dumper() [CDB] Traceback (most recent call last): [CDB] File "<string>", line 1, in <module> [CDB] NameError: name 'Dumper' is not definedSo inspect.py imports typing.py that is not exists. So cdbbridge and embedded python library is not compete.
I tried:- install qtcreatorcdbext other version (same error);
- install python and specify PYTHONPATH and PYTHONHOME env variables (same error);
- copy python 313 library to cdbbridge folder manually (version error);
I hope that you will explain to me the reason for the error and explain what I missed during the installation process (I am sure that the installation is not complete).
Thx in advance)
-
Hi and welcome to devnet,
AFAIK, the typing module is part of Python's standard library.
Can you try with an official release ?
-
I use Qt Creator 19.0.2 portable build (qtcreator-windows-x64-msvc-19.0.2.7z). I copied qtcreatorcdbext contents to <Qt folder>/lib. When I launch qt creator start debugging and stop on breakpoint I get
[CDB] DEBUG: 5:sys.path.insert(1, '...\\QtCreator-19.0.2.7\\share\\qtcreator\\debugger') [CDB] DEBUG: 6:from cdbbridge import Dumper [CDB] Traceback (most recent call last): [CDB] File "<string>", line 1, in <module> [CDB] File "...\QtCreator-19.0.2.7\share\qtcreator\debugger\cdbbridge.py", line 4, in <module> [CDB] import inspect [CDB] File "D:/a/qt-creator/qt-creator/build/build-qtcreatorcdbext/x64-bld-prefix/src/x64-bld-build/python-lib\inspect.py", line 163, in <module> [CDB] ModuleNotFoundError: No module named 'typing' [CDB] DEBUG: 7:print(dir()) [CDB] ['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'cdbext', 'sys'] [CDB] DEBUG: 8:theDumper = Dumper() [CDB] Traceback (most recent call last): [CDB] File "<string>", line 1, in <module> [CDB] NameError: name 'Dumper' is not definedSo inspect.py imports typing.py that is not exists. So cdbbridge and embedded python library is not compete.
I tried:- install qtcreatorcdbext other version (same error);
- install python and specify PYTHONPATH and PYTHONHOME env variables (same error);
- copy python 313 library to cdbbridge folder manually (version error);
I hope that you will explain to me the reason for the error and explain what I missed during the installation process (I am sure that the installation is not complete).
Thx in advance)
@Xxproner It looks like typing.py is excluded, see https://github.com/qt-creator/qt-creator/blob/master/cmake/CreatePythonXY.cmake#L33
It's a one line change. Do report the issue at https://qt-project.atlassian.net/secure/CreateIssue.jspa?pid=10234
You can:
- Fork https://github.com/qt-creator/qt-creator
- Enable GitHub Actions
- In your fork do the one line change
- Push a release tag, and you'll have your own binaries!
-
@Xxproner It looks like typing.py is excluded, see https://github.com/qt-creator/qt-creator/blob/master/cmake/CreatePythonXY.cmake#L33
It's a one line change. Do report the issue at https://qt-project.atlassian.net/secure/CreateIssue.jspa?pid=10234
You can:
- Fork https://github.com/qt-creator/qt-creator
- Enable GitHub Actions
- In your fork do the one line change
- Push a release tag, and you'll have your own binaries!
@cristian-adam said in [CDB] ModuleNotFoundError: No module named 'typing':
@Xxproner It looks like typing.py is excluded, see https://github.com/qt-creator/qt-creator/blob/master/cmake/CreatePythonXY.cmake#L33
It's a one line change. Do report the issue at https://qt-project.atlassian.net/secure/CreateIssue.jspa?pid=10234
A patch has been submitted :-)