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

Error message on Windows 11 #51

Closed
EmpathicSage opened this issue Oct 29, 2023 · 3 comments
Closed

Error message on Windows 11 #51

EmpathicSage opened this issue Oct 29, 2023 · 3 comments

Comments

@EmpathicSage
Copy link

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

  • Instead of source .venv/bin/activate use . .\.venv\Scripts\activate
  • Instead of export OPENAI_API_KEY=<your key>, use $ENV:OPENAI_API_KEY = "YOUR_KEY"

Environment

  • OS: Windows 11 Pro 22H2 22621.2428
  • Shell: PowerShell 7.3.8
  • Python Version: 3.11.6 (from Microsoft Store)
  • Commit: 50c1f6c (HEAD -> main, tag: v1.4.0, origin/main, origin/HEAD)
@github-actions
Copy link

Hey! Thanks for sharing feedback with the community!

@EmpathicSage
Copy link
Author

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

#49

@JoelKronander
Copy link
Collaborator

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

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