Skip to content

eval(thought_string) -> SyntaxError: invalid syntax #75

@qingerVT

Description

@qingerVT

I am running into this error with python 3.10 or 3.12 after "pip3 install -U tree-of-thoughts" . Any thoughts?

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/local/home/qinsun/meta_agent/tot/tot.py", line 28, in <module>
    final_thought = dfs_agent.run(initial_state)
  File "/local/home/qinsun/meta_agent/tot/tot/lib/python3.10/site-packages/tree_of_thoughts/dfs.py", line 98, in ru
n
    initial_thoughts = self.dfs(task, *args, **kwargs)
  File "/local/home/qinsun/meta_agent/tot/tot/lib/python3.10/site-packages/tree_of_thoughts/dfs.py", line 67, in df
s
    next_thoughts = list(
  File "/home/qinsun/.local/share/mise/installs/python/3.10.15/lib/python3.10/concurrent/futures/_base.py", line 62
1, in result_iterator
    yield _result_or_cancel(fs.pop())
  File "/home/qinsun/.local/share/mise/installs/python/3.10.15/lib/python3.10/concurrent/futures/_base.py", line 31
9, in _result_or_cancel
    return fut.result(timeout)
  File "/home/qinsun/.local/share/mise/installs/python/3.10.15/lib/python3.10/concurrent/futures/_base.py", line 45
8, in result
    return self.__get_result()
  File "/home/qinsun/.local/share/mise/installs/python/3.10.15/lib/python3.10/concurrent/futures/_base.py", line 40
3, in __get_result
    raise self._exception
  File "/home/qinsun/.local/share/mise/installs/python/3.10.15/lib/python3.10/concurrent/futures/thread.py", line 58, in run    result = self.fn(*self.args, **self.kwargs)
  File "/local/home/qinsun/meta_agent/tot/tot/lib/python3.10/site-packages/tree_of_thoughts/agent.py", line 132, i$ run    return string_to_dict(agent_output)
  File "/local/home/qinsun/meta_agent/tot/tot/lib/python3.10/site-packages/tree_of_thoughts/agent.py", line 14, in string_to_dict    return eval(thought_string)
  File "<string>", line 0
    
SyntaxError: invalid syntax

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions