-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
can't autocomplete for cv2 #606
Comments
I had finally find the solution, the key point is about the Numpy's version!!! It seems that in py-extension, the jedi can't work with the Numpy's newest version(1.14.0) and the python3's cv2 module can only be autocompleted when numpy work well. So I changed Numpy version to 1.10.0, then everything OK!!! |
It may be worth reporting this directly to jedi |
@MikhailArkhipov After more testing and thinking, I found that it may not be the jedi's fault. I both test the jedi module in vscode's F5 and my terminal's 'python test.py'. The terminal one outputs autocompletions really well,which means the jedi is in fact work well. So I found the real fault may be that the vscodePy-extension's python interpreter don't fit the numpy's newest version.(the jedi module I used both were jedi that in py-extension.And I used |
I have reported it upstream. |
for me, this issue fixes after the feb update |
I feel like this one was solved. Please retry with the latest release. NumPy completions work for me. Haven't tried cv2. |
Everything works well now. |
Yep, numpy works but cv2 is still an issue. |
@brettcannon I updated my numpy to newest version, then I had also tried cv2's autocompletion. For me cv2's completion works well now. But I can't ensure other people's situation. |
@yuboona you're right, it's fixed! I was running into a bug that we had. |
@brettcannon Hi, I'm still struggling with this slow or no autocomplete problem for
Any idea? Why it is still so slow? Also, it will cause around 17.4% CPU usage on my laptop. In fact, I have to wait the hint of function usage for around 10 seconds, and the CPU usage will increase in that time interval. I would also like to know what is the root cause of this huge CPU consume and slow autocomplete. By tying these and press F5 in my VSCode: import jedi
print(jedi.__file__)
print(jedi.Script("import cv2\ncv2.").completions()) I can quickly get the results:
Also, I've tried the method suggested in #606, i.e. compile the dev version of vscode python plugin. Which, however, takes me around 2 hours now, still in |
Hm, why Jedi is 0.9? Latest is 0.12 and that is what we ship in 2018.4. |
Environment data
VS Code version: 1.19.2
Python Extension version: 0.9.1
Python Version: 3.5.2
OS and version: ubuntu 16.04.02
Actual behavior
Expected behavior
Expect more autocompletions
Steps to reproduce:
Some test
I did some interesting test on py-extension's jedi. I new a test.py in the path where jedi locate in extension'~/.vscode/extensions/ms-python.python-0.9.1/pythonFiles/preview/jedi'. Then I import this jedi module.
Output from
Console window
(Help->Developer Tools menu)But when I excuted code in my Terminal using 'python test.py', the output is the correct autocompletion and this is just done by extension's jedi:
Output from
Terminal
output.txt
The text was updated successfully, but these errors were encountered: