opensouls / terminal-copilot

A smart terminal assistant that helps you find the right command.
Apache License 2.0
573 stars 43 forks source link

Error message on Windows 11 #51

Closed EmpathicSage closed 10 months ago

EmpathicSage commented 10 months ago

Description

When invoking the copilot command-line option on a Windows 11 machine, a TypeError is raised indicating a missing argument for the function build_conversation().

Expected Behavior

Executing the copilot command should not produce any errors, and it should function as intended.

Steps to Reproduce

  1. Activate the virtual environment with (.venv)
  2. Run the copilot command without the -q switch: copilot list files
  3. Observe the error output

Actual Behavior

Upon execution, the following error is displayed:

(.venv) PS C:\Users\Owner\zgit\terminal-copilot> copilot list files
Traceback (most recent call last):
  File "C:\Users\Owner\zgit\terminal-copilot\.venv\Scripts\copilot-script.py", line 33, in <module>
    sys.exit(load_entry_point('terminal-copilot==1.4.0', 'console_scripts', 'copilot')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Owner\zgit\terminal-copilot\.venv\Lib\site-packages\terminal_copilot-1.4.0-py3.11.egg\copilot\main.py", line 74, in main
    conversation = build_conversation(context)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: build_conversation() missing 1 required positional argument: 'usermessage'

Additional Observations

When using the -q switch, the error does not occur. For instance:

(.venv) PS C:\Users\Owner\zgit\terminal-copilot> copilot -q hello copilot
> Hello! How can I assist you today?
Hello! How can I assist you today?

NOTE: Windows installation steps are slightly different from the documentation

Environment

github-actions[bot] commented 10 months ago

Hey! Thanks for sharing feedback with the community!

EmpathicSage commented 10 months ago

Ahh, it seems we already have a similar issue mentioned here:

https://github.com/opensouls/terminal-copilot/issues/49

JoelKronander commented 10 months ago

I beleive this is now fixed. @EmpathicSage can you verify it works as expected now?