Hi,
Autocompletion doesn’t work for Panda3D 1.10.11. in VSCode 1.68.1. Is it possible to solve this problem?
Hi,
Autocompletion doesn’t work for Panda3D 1.10.11. in VSCode 1.68.1. Is it possible to solve this problem?
I think the thing is that panda comes as libraries .pyd, most likely you should specify in your editor the search paths for libraries.
I have this information:
This problem is caused by the lack of
.subs
files inpanda3d
package, not vscode. Related problem has been raised in GitHub. Please wait for the update of package.
It was given by MingJie-MSFT on StackOverflow.
You can download the folder types-panda3d/src/panda3d-stubs at master · WMOkiishi/types-panda3d · GitHub with https://download-directory.github.io/ , name it
panda3d-stubs
and add the directory containing it to the VSCode’s settings.
"python.analysis.extraPaths": [
"C:\\Users\\user\\Documents\\panda3d\\stubs"
]
For example:
"python.analysis.extraPaths": [
"E:\\Libs\\panda3d"
]
Microsoft is always coming up with innovations that simply shift their problems to others. I think VSCode should have a tool to generate such files, as it needs them.
Have you ever tried “self.reparentTo”?VSCode still can not recongnize it.
If you guys want to generate the .pyi files yourself, here is how you can do it Python: Generate function stubs from C module - Stack Overflow
Basically, install mypy:
pip install mypy
and then in the Panda folder use:
stubgen -o ./ -p panda3d
done.