Giter Site home page Giter Site logo

Comments (6)

KillianLucas avatar KillianLucas commented on May 19, 2024 1

This is a weird one. We have an unconventional setup with the CLI to keep things simple for Python users:

When the user starts the CLI, poetry will run interpreter.cli().
interpreter is an instance of the Interpreter class in interpreter.py, which has a method called cli.

What's nice about having the instance as the module, is that when Python users run import interpreter they get an instance of interpreter, which is way more intuitive to me.

But this means we risk circular imports and other weird stuff like this.

ChatGPT is telling me that some systems import things in different orders, and this could be causing the problem.

Let me get back to you on this one. Thanks for opening an issue @antondkv.

from open-interpreter.

uthpala1000 avatar uthpala1000 commented on May 19, 2024

same on windows

from open-interpreter.

uthpala1000 avatar uthpala1000 commented on May 19, 2024

This is a weird one. We have an unconventional setup with the CLI to keep things simple for Python users:

When the user starts the CLI, poetry will run interpreter.cli(). interpreter is an instance of the Interpreter class in interpreter.py, which has a method called cli.

What's nice about having the instance as the module, is that when Python users run import interpreter they get an instance of interpreter, which is way more intuitive to me.

But this means we risk circular imports and other weird stuff like this.

ChatGPT is telling me that some systems import things in different orders, and this could be causing the problem.

Let me get back to you on this one. Thanks for opening an issue @antondkv.

I managed solve it just by removing the dot . from .cli to from cli

from open-interpreter.

uthpala1000 avatar uthpala1000 commented on May 19, 2024

I managed solve it just by removing the dot . from .cli to from cli

remove dot from interpreter.py . from .cli to from cli

from open-interpreter.

KillianLucas avatar KillianLucas commented on May 19, 2024

Thanks @uthpala1000 and @antondkv. This is so weird, it's the opposite for me (breaks if I remove the dot). Is there any precedent for doing something like this?

try:
  from .cli import cli
except:
  from cli import cli

Have either of you seen something like this before / know what's going on?

from open-interpreter.

antondkv avatar antondkv commented on May 19, 2024

@KillianLucas, thank you for the reply! I have already re-installed the module using the Python --user ENV instead of the root one, and this problem has disappeared for me

from open-interpreter.

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.