Code Monkey home page Code Monkey logo

Comments (8)

davidhalter avatar davidhalter commented on July 3, 2024

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.

Sniper10754 avatar Sniper10754 commented on July 3, 2024

i never created a venv, neither i have a defunct one in the directory im modifying things in

from jedi.

davidhalter avatar davidhalter commented on July 3, 2024

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.

lcruz99 avatar lcruz99 commented on July 3, 2024

same issue happening since 3 days ago

from jedi.

Sniper10754 avatar Sniper10754 commented on July 3, 2024

I found a simple fix: nuke $HOME/.cache/jedi, so i assume the problem is somehow related to cache

from jedi.

wsldankers avatar wsldankers commented on July 3, 2024

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.

davidhalter avatar davidhalter commented on July 3, 2024

@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.

wsldankers avatar wsldankers commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.