#errors importing interpreter

67 messages ยท Page 1 of 1 (latest)

grand jacinth
#

first installed with pip.
then did pip install --upgrade --force-reinstall git+https://github.com/KillianLucas/open-interpreter.git

Type "help", "copyright", "credits" or "license" for more information.
>>> from interpreter import interpreter
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pinguin/projects/myenv/lib/python3.11/site-packages/interpreter/__init__.py", line 2, in <module>
    from .core.core import OpenInterpreter
  File "/home/pinguin/projects/myenv/lib/python3.11/site-packages/interpreter/core/core.py", line 15, in <module>
    from .computer.computer import Computer
  File "/home/pinguin/projects/myenv/lib/python3.11/site-packages/interpreter/core/computer/computer.py", line 8, in <module>
    from .display.display import Display
  File "/home/pinguin/projects/myenv/lib/python3.11/site-packages/interpreter/core/computer/display/display.py", line 15, in <module>
    import cv2
ModuleNotFoundError: No module named 'cv2'```
GitHub

A natural language interface for computers. Contribute to OpenInterpreter/open-interpreter development by creating an account on GitHub.

lunar drift
#

i submitted a fix for this already, but for now you can run pip install open-interpreter[os] pip install chromadb pip install tesseract
that should grab all the missing components

grand jacinth
#

does it use torch as well?
open-interpreter[os] installed a lot of packages!

#

although i am not going to use the os version

lunar drift
#

oh

#

well in that case you only need pip install opencv-python

grand jacinth
#

can i use the os version if i am on linux terminal? if yes, i can continue the installation

lunar drift
#

os mode interacts with visual elements so nope

#

not sure if you're referring to having a terminal open in linux, or connecting by SSH

grand jacinth
#

terminal open in linux as in chrome os

lunar drift
#

if its an actual system you could yes

#

as long as its not headless

grand jacinth
#

thank you. any idea how to fix "computer is not found" method , see my other ticket in issues -forum

lunar drift
#

were you using os mode?

grand jacinth
#

nope

lunar drift
#

did it still happen after reinstalling from git?

grand jacinth
#

i removed that linux environment and started a new

#

should i do another forced reinstall?

lunar drift
#

do you have the normal pip one already installed?

grand jacinth
#

yes

#

keep getting this

NameError Traceback (most recent call last)
Cell In[8], line 2
1 print('##active_line1##')
----> 2 computer.browser.search

NameError: name 'computer' is not defined

lunar drift
#

can you locate default_system_message.py

#

for a quick fix we can remove the references to the computer api

#

they really shouldnt be there when not using os mode, ill look into writing a fix for that later

#

this highlighted part is what you would want to remove from the file

grand jacinth
#

but it worked just fine recently in non-os interpreter, and the computer.browser.search was absolutely amazing

#

what will it use instead to search online?

lunar drift
#

oh, search was working before without os mode?

grand jacinth
#

is it possible to import 'computer' manually?

#

yes, was working just fine

#

then started generating JSONDecodeError when doing search

#

(i reported it in issues on github)

#

i went to re-install on linux and use python only

#

and now it can not figure out what computer is

#

is it possible to import it ?

lunar drift
#

inside core.py and computer.py i see
import_computer_api=False
you could try changing those to True im not sure if that would force it or not

grand jacinth
#

ok , let me try

#

never mind, one was global , another was for venv

#

still the same problem
Expecting value: line 1 column 1 (char 0)
Continuing.

computer.browser.search('latest news')


NameError Traceback (most recent call last)
Cell In[6], line 2
1 print('##active_line1##')
----> 2 computer.browser.search('latest news')

NameError: name 'computer' is not defined

#

should i define 'computer' anywhere?

#

it's computer = Computer() , right?

lunar drift
#

hmmm

grand jacinth
#

i tried to import these:

from interpreter.core.core import OpenInterpreter

interpreter = OpenInterpreter()
computer = interpreter.computer
from interpreter.core.computer.terminal.base_language import BaseLanguage
interpreter.chat()
but still get the same error 'computer is not defined'

lunar drift
#

its probably not imported there either

grand jacinth
#

the AI gave me its own interpretation : "It looks like there was an error because the computer module wasn't recognized. I think this could be due
to an issue with the simulated execution environment. Normally for a system with the appropriate
permissions and installations, the execution should have worked fine. However, in our current simulated
environment, the functional implementation of the 'computer' module seems to be unavailable. "

lunar drift
#

i see inside core.py this is how they were importing it
from .computer.computer import Computer

#

maybe try adding that import computer, im not super familiar with how this part works @real wren might know more

grand jacinth
#

from interpreter.core.computer.computer import Computer

computer = Computer()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Computer.init() missing 1 required positional argument: 'interpreter'

lunar drift
#

change it tocomputer = Computer(interpreter)

#

totally guessing here though

grand jacinth
#

NameError: name 'computer' is not defined

#

thanks much for stepping in and offering your help

#

much appreciated

lunar drift
#

wish i knew what was happening to it, but theres a lot of huge brains around here ๐Ÿง 
someone will probably have a better idea

real wren
#

Can you run

interpreter --version
grand jacinth
#

@real wren Open Interpreter 0.2.4 New Computer Update

real wren
#

๐Ÿ‘

#

Will have a look at this later currently at work

lean gale
#

Same Issue here ๐Ÿ™‚

low lava
#

Having the same issue and getting 500 Server Errors after adding a a debug line to model.py L977

print("Debug - Content received:", self.text)

That yielded a 500 Server error and the same JSON parsing error mentioned earlier.

Debug - Content received:
<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>500 Server Error</title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Server Error</h1>
<h2>The server encountered an error and could not complete your request.<p>Please try again in 30 seconds.</h2>
<h2></h2>
</body></html>```
low lava
#

This error likely comes from https://github.com/OpenInterpreter/open-interpreter/blob/main/interpreter/core/computer/browser/browser.py

A quick test on that endpoint based on the API is showing a 500 Error as mentioned above
https://api.openinterpreter.com/v0/browser/search?query=test

GitHub

A natural language interface for computers. Contribute to OpenInterpreter/open-interpreter development by creating an account on GitHub.

real wren
grand jacinth
vagrant spoke
#

I tried to set up open interpret in my windows laptop. It is showing this.

grand jacinth
vagrant spoke
#

why it