-
-
Notifications
You must be signed in to change notification settings - Fork 508
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
Jedi searches the python interpreter in the wrong path. #1975
Comments
This is searching |
i never created a venv, neither i have a defunct one in the directory im modifying things in |
The problem is that I have no way to debug this. This is not a pure Jedi call. I don't know what I would be surprised if this was a fundamental issue. Jedi has been downloaded about 800 million times and it's used widely. This code hasn't changed a lot in a few years. So either it's a really strange edge case or something in your system is just broken. |
same issue happening since 3 days ago |
I found a simple fix: nuke |
In jedilsp/jedi/api/project.py line 244 where it says: if self._environment_path is not None: it should instead read: if self._environment_path: …because this setting can also be the empty string when left unconfigured. |
@wsldankers No. An empty path should behave like an empty path. I'm not sure what exactly happens in that case. If an empty string never provides any useful result we should let the user know that and raise an exception instead of just swallowing a very and invalid value. If it implies the "current working directory"? that might be a fine behavior. |
Well if that's the case, how do I change it from an empty string to None? I have no idea. In my case it's the vscode plugin that is sending an empty string as environmentPath over jsonrpc. If that is incorrect behavior it's not a bug in jedi. If this is the same issue that @Sniper10754 is experiencing, then this bug can probably be closed. |
Im a linux user which is using jedi in the python vscodium extension, after editing with jedi for a bit it started searching for the python interpreter in
bin/python
making it relative instead of searching it from the root, like it should be (/bin/python
), heres the stack trace which jedi outputsThe text was updated successfully, but these errors were encountered: