Skip to content

Some errors i got while using pywinassistant #22

@justinwj

Description

@justinwj
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

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