Skip to content

AttributeError: 'list' object has no attribute 'lower' when starting interpreter from master branch #1120

Open
@tiry

Description

@tiry

Describe the bug

Trying to run the interpreter from the source code / main branch (the wheel version works ok)

 > interpreter
Traceback (most recent call last):
  File "/Users/tiry/Library/Caches/pypoetry/virtualenvs/open-interpreter-qdM9pZ2G-py3.11/bin/interpreter", line 3, in <module>
    from interpreter.terminal_interface.start_terminal_interface import main
  File "/Users/tiry/dev/open-interpreter/interpreter/__init__.py", line 4, in <module>
    interpreter = OpenInterpreter()
                  ^^^^^^^^^^^^^^^^^
  File "/Users/tiry/dev/open-interpreter/interpreter/core/core.py", line 129, in __init__
    self.computer.skills.import_skills()
  File "/Users/tiry/dev/open-interpreter/interpreter/core/computer/skills/skills.py", line 51, in import_skills
    if "traceback" in output.lower():
                      ^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'lower'
 ~/dev/open-interpreter │ on main !1 ?1  [IPKernelApp] WARNING | Parent appears to have exited, shutting down.                            1 х │ 3.11.8 Py

Basically, it seems that the output is a dictionary

output = self.computer.run("python", code_to_run)

whereas the code expected a string

    if "traceback" in output.lower():

In my case, output = [{'type': 'console', 'format': 'output', 'content': ''}]

Reproduce

  1. Clone the repository
  2. pyenv shell 3.11.8
  3. poetry install
  4. source $(poetry env info --path)/bin/activate
  5. python -m interpreter

Expected behavior

Display the interpreter prompt without errir

Screenshots

No response

Open Interpreter version

main branch

Python version

3.11.8

Operating System name and version

MacOS 14.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions