davidhalter / jedi

Awesome autocompletion, static analysis and refactoring library for python
http://jedi.readthedocs.io
Other
5.81k stars 508 forks source link

No autocomplete for cv2 package in VS Code #1693

Closed HenriqueAJNB closed 4 years ago

HenriqueAJNB commented 4 years ago

I'm trying to figure out why does the autocomplete for cv2 package is not working properly. Below some information about issue and versions that I'm using and my attempts to solve it:

Autocomplete in VS Code

enter image description here

Versions information

All 3 packages above are installed at C:\...\anaconda3\lib\site-packages

My attempts

PS: I've limited the output because questions have a limitation regarding number of characters, can't bring them all.

>>> print(jedi.Script("import cv2\ncv2.").completions())
<stdin>:1: DeprecationWarning: Deprecated since version 0.16.0. Use Script(...).complete instead.
[<Completion: >, <Completion: absdiff>, <Completion: ACCESS_FAST>, <Completion: ACCESS_MASK>, <Completion: ACCESS_READ>, <Completion: ACCESS_RW>, <Completion: ACCESS_WRITE>, <Completion: accumulate>, <Completion: accumulateProduct>, <Completion: accumulateSquare>, <Completion: accumulateWeighted>, <Completion: ADAPTIVE_THRESH_GAUSSIAN_C>, <Completion: ADAPTIVE_THRESH_MEAN_C>, <Completion: adaptiveThreshold>, <Completion: add>, <Completion: addText>, <Completion: addWeighted>, <Completion: AffineTransformer>, <Completion: AGAST_FEATURE_DETECTOR_AGAST_5_8>, <Completion: AGAST_FEATURE_DETECTOR_AGAST_7_12D>, <Completion: AGAST_FEATURE_DETECTOR_AGAST_7_12S>, <Completion: AGAST_FEATURE_DETECTOR_NONMAX_SUPPRESSION>, <Completion: AGAST_FEATURE_DETECTOR_OAST_9_16>, <Completion: AGAST_FEATURE_DETECTOR_THRESHOLD>, <Completion: AgastFeatureDetector>, <Completion: AgastFeatureDetector_AGAST_5_8>, <Completion: AgastFeatureDetector_AGAST_7_12d>, <Completion: AgastFeatureDetector_AGAST_7_12s>, <Completion: AgastFeatureDetector_create>, <Completion: AgastFeatureDetector_NONMAX_SUPPRESSION>, <Completion: AgastFeatureDetector_OAST_9_16>, ... 

If anyone could give me a hint, I'll be glad, even to point where the issue really is.

The output should be all the attributes and methods from cv2.

And one last information: numpy autocomplete works normally.

davidhalter commented 4 years ago

Since you provided an example where it works with Jedi, this is most likely an issue with the VS Code Python Extension.

So I'm going to close. You should probably open an issue there.

BTW: I saw the stackoverflow post, but I wasn't able to help.