open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

AttributeError: 'Computer' object has no attribute 'files' │

Open bars0um opened this issue 1 year ago • 1 comments

Describe the bug

The Computer module is missing the files property (it's never assigned).

On asking the model to use it to write files I get the following error:

  ---------------------------------------------------------------------------                                                                │pepperold
  AttributeError                            Traceback (most recent call last)                                                                │(base) root@95a04b3632d1:/app#
  Cell In[7], line 8                                                                                                                         │
        6 destination_file_name = '/app/time.txt'                                                                                             │
        7 print('##active_line4##')                                                                                                          │
  ----> 8 computer.files.write(destination_file_name, code)                                                                                  │
        9 print('##active_line7##')                                                                                                          │
       10 print("Time script 'time.txt' has been written to /app.")                                                                           │
                                                                                                                                             │
  AttributeError: 'Computer' object has no attribute 'files'                                                                                 │

Reproduce

Just ask it to use the computer module yto edit a file...

Expected behavior

Successfully run the code

Screenshots

No response

Open Interpreter version

0.2.2

Python version

3.11

Operating System name and version

Debian-base docker container

Additional context

No response

bars0um avatar Mar 21 '24 23:03 bars0um

proposed fix: https://github.com/OpenInterpreter/open-interpreter/pull/1107

bars0um avatar Mar 21 '24 23:03 bars0um

closing after merge of https://github.com/OpenInterpreter/open-interpreter/pull/1107

bars0um avatar Mar 24 '24 19:03 bars0um