Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some errors i got while using pywinassistant #22

Open
justinwj opened this issue May 19, 2024 · 1 comment
Open

Some errors i got while using pywinassistant #22

justinwj opened this issue May 19, 2024 · 1 comment

Comments

@justinwj
Copy link

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
Copy link

Got the same errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants