Closed silegc-xguard closed 2 years ago
Hi, I'll chip in with my solution here since I just had this problem myself. Please correct me if I am wrong, but I think this is due to the API being distributed as a .pyd-file. The VSCode intellisense is not able to read those directly, since its a binary file, more specifically a DLL. To get intellisense to work, I used the genstub tool to decompile the .pyd files present in the pyzed api and it created .pyi-files for my intellisense to read. Just run the genstub tool (I think I added -m
-switch for module) and point it to the pyzed api folder. Voilá. Hope it helps!
Thanks ! I got it to work that way.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
@haavarpb @silegc-xguard Hello, thanks for sharing the question and tip. I'm following the guide but I don't understand the last part "point it to the pyzed api folder". Could you explain what that means?
or. I guess I genstubbed a wrong file. Now I ran genstub on .pyb file in my pyzed,
stubgen -m sl.cp38-win_amd64
I get
sl.cp38-win_amd64: Failed to import, skipping with error: No module named 'sl.cp38-win_amd64'; 'sl' is not a package
How did you resolve this one?
Preliminary Checks
Description
Hi everyone,
I installed the Python API through the get_python_api.py script. While I can compile/run every example, I can't get code completion (Intellisense) to work. I'm running Python 3.8.5 with Anaconda in VsCode.
Is there a way to enable it ? It would be a very useful for development instead of always needing to refer to the online API documentation.
Thanks, Simon
Steps to Reproduce
Expected Result
Code completion should work
Actual Result
No code completion results appear at any level of the API
ZED Camera model
ZED2i
Environment
Anything else?
No response