Comments (8)
This is searching bin/python
in the virtual environment that was probably specified here. I'm pretty sure there is some misconfiguration here where a project exists that points towards a now defunct venv.
from jedi.
i never created a venv, neither i have a defunct one in the directory im modifying things in
from jedi.
The problem is that I have no way to debug this. This is not a pure Jedi call. I don't know what project
is at this point. I have no idea about your system about installed Python version. So unless you start trying to debug this yourself (the environment.py
code is extremely simple), I'm afraid I cannot help you.
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.
from jedi.
same issue happening since 3 days ago
from jedi.
I found a simple fix: nuke $HOME/.cache/jedi
, so i assume the problem is somehow related to cache
from jedi.
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.
from jedi.
@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.
from jedi.
Well if that's the case, how do I change it from an empty string to None? I have no idea.
Edit: that's probably IDE dependent. I'll need to look into that first.
Edit 2: this MAY be fixed in microsoft/vscode-python#22713 but that fix is not in a release yet.
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.
from jedi.
Related Issues (20)
- Addition of type annotation breaks tab completion in jedi>=0.19.0
- kwargs forwarding? HOT 1
- `LazyKnownValues` has no attribute `string_name`? HOT 4
- Enum name auto-completion without parentheses HOT 1
- Unhandled Exception with Unnamed Lambdas When Analyzing References Using dynaconf
- Add support for async pytest fixtures
- Is it possible to generate completion for `argparse.Namespace`? HOT 5
- TypedDict : Suggestion issues HOT 2
- Python stubs loaded from extensions folder even when using an explicit interpreter HOT 8
- Error when trying to detect environment HOT 5
- `PathFinder` has no attribute `find_module` in `python 12.2` HOT 2
- Questions about Copilot + Open Source Software Hierarchy HOT 1
- What exactly does "smart_sys_path" do? HOT 5
- Completion fails when variable name is identical to type name HOT 4
- 'TreeInstance' object has no attribute 'with_generics' when using typing.Literal["str"] return annotation on property HOT 4
- How to discover the import statement for a particular Name? HOT 4
- Does Jedi support type inference for type annotations that include generics? HOT 2
- _get_executable_path() can't get the correct path on Windows Anaconda
- Issues with pytest 8 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jedi.