a-real-ai / pywinassistant

The first open source Large Action Model generalist Artificial Narrow Intelligence that controls completely human user interfaces by only using natural language. PyWinAssistant utilizes Visualization-of-Thought Elicits Spatial Reasoning in Large Language Models.
MIT License
1.24k stars 174 forks source link

Some errors i got while using pywinassistant #22

Open justinwj opened 1 month ago

justinwj commented 1 month ago
Exception in thread Thread-210 (run_assistant):
Traceback (most recent call last):
  File "Python312\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "Python\Python312\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "pywinassistant\core\assistant.py", line 164, in run_assistant
    assistant(assistant_goal=action, called_from="assistant")
  File "pywinassistant\core\driver.py", line 253, in assistant
    assistant_goal = imaging(window_title=app_name, additional_context=additional_context, screenshot_size='Full screen')['choices'][0]['message']['content']
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'choices'

and

`Exception in Tkinter callback
Traceback (most recent call last):
  File "Python\Python312\Lib\tkinter\__init__.py", line 1967, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "pywinassistant\.venv\Lib\site-packages\customtkinter\windows\widgets\ctk_button.py", line 554, in _clicked
    self._command()
  File "pywinassistant\core\assistant.py", line 262, in <lambda>
    Ctk.CTkButton(menu_frame, text="Stop", command=lambda: menu_command(stop_assistant)).pack(fill="x")
                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "pywinassistant\pywinassistant\core\assistant.py", line 236, in menu_command
    context_menu.destroy()  # Destroy the menu after executing the command
    ^^^^^^^^^^^^^^^^^^^^^^
  File "pywinassistant\.venv\Lib\site-packages\customtkinter\windows\ctk_toplevel.py", line 91, in destroy
    tkinter.Toplevel.destroy(self)
  File "Python\Python312\Lib\tkinter\__init__.py", line 2656, in destroy
    self.tk.call('destroy', self._w)
_tkinter.TclError: can't invoke "destroy" command: application has been destroyed`

was using gpt-4-1106-preview in core_api.py and gpt-4o-2024-05-13 in core_imaging.py

magicman-dot commented 4 weeks ago

Got the same errors.