-
Notifications
You must be signed in to change notification settings - Fork 768
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
python.analysis.extraPaths feature still is not working #793
Comments
Could you please send us your logs that show the exact version and also send us your settings.json so that we can see what the extrapaths is set to? thanks |
I am also seeing this. My {
"python.analysis.extraPaths": [
"${workspaceFolder}/lib/python"
]
} Logs show
|
There's an unfortunate issue at the moment with the logs, where the extraPaths aren't printed due to them being provided to the analyzer differently; unfortunately that means they don't show up there. @adam-azarchs I'm not sure your issue is related; this original issue is saying that "Pylance says my code is okay, but it crashes at runtime". Is that what you are experiencing? |
It turns out my issue was due to pylance not expanding |
Ah, workspaceRoot is one that isn't supported yet. #548 covers that, we support |
@Alexander770 It's been a bit since you filed this without any updates; I'll close this for now. If you have more info about your config and your logs, we can reopen this to take a look. |
I'm experiencing the same problem. I'm expecting to see list of functions/variables when importing custom library but I can only see My workspace settings:
Few lines of user settings:
Windows 10, Pylance 2021.2.3, Python 3.8.5 |
|
It'e just Pycharm is more professional
…On Sun, Feb 21, 2021, 2:46 AM Kerim ***@***.***> wrote:
I'm experiencing the same problem. I'm expecting to see list of
functions/variables when importing custom library but I can only see No
suggestions.
I've tried setting python.analysis.extraPaths to full path/relative path
but nothing helps. I've set this to both user settings and workspace
setting without success (unlike this issue
<#588>)
My workspace settings:
{
"python.pythonPath": "C:\\Users\\tasik\\.julia\\conda\\3\\python.exe",
"python.analysis.extraPaths": [
"C:\\apps\\MyHighFive\\HFGt\\build-MSVC2019-Release\\Debug"
]
}
Few lines of user settings:
"python.languageServer": "Pylance",
"python.analysis.completeFunctionParens": true,
"python.analysis.extraPaths": [
"C:\\apps\\MyHighFive\\HFGt\\build-MSVC2019-Release\\Debug"
]
Windows 10, Pylance 2021.2.3, Python 3.8.5
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#793 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMYDWWLFMMPVXGY3ACE6BM3TABJVVANCNFSM4VPIQOFQ>
.
|
@erictraut thank you for response.
but didn't help. My module (.pyd binary) is in @Alexander770 yes, but it is slower, I prefer vs code |
Ah, then the problem has nothing to do with import resolution or extraPaths. Pylance is resolving the import to your ".pyd" file. However, Pylance does not attempt to extract any type information out of a binary file. Doing so would require loading and executing that file, which would be unsafe from a security standpoint. If you want Pylance to reason about the types in that library (including the names of functions, classes, etc.), you will need a Python type stub file (.pyi) for the library. Please contact the author of the library to see if a stub file is available. Increasingly, library authors are providing type information. |
@erictraut thank you for the information. |
Environment data
Expected behaviour
Allows to import additional\custom modules and classes
Actual behaviour
Although the editor does not show/highlight any command the actual ModuleNotFoundError is issued during runtime
Logs
Code Snippet / Additional information
The text was updated successfully, but these errors were encountered: