promptops / cli

um is a GPT-powered CLI assistant. Ask questions in plain English, get the perfect shell command.
https://promptops.com
GNU General Public License v3.0
122 stars 3 forks source link

always crashes on the same prompt #1

Closed alegmal closed 1 year ago

alegmal commented 1 year ago

hi, have some strange issue when testing the tool

prompt: um terraform command to dry run it gave plan and init commands so i added more context that inits and plan, i need to dry run before applying and it crashed.

running the prompt again (um terraform command to dry run) leads to the same crashing error. other prompts work but returning to do "um terraform command to dry run" prompt crashes the cli.

running other prompts in between does not help - the cli still crashes if i try to run um terraform command to dry run

Traceback (most recent call last):
  File "/usr/local/bin/um", line 33, in <module>
    sys.exit(load_entry_point('promptops==0.1.2', 'console_scripts', 'um')())
  File "/usr/local/Cellar/promptops-cli/0.1.2/libexec/lib/python3.10/site-packages/promptops/main.py", line 117, in entry_alias
    query.query_mode(args)
  File "/usr/local/Cellar/promptops-cli/0.1.2/libexec/lib/python3.10/site-packages/promptops/query/query.py", line 392, in query_mode
    do_query(" ".join(args.question))
  File "/usr/local/Cellar/promptops-cli/0.1.2/libexec/lib/python3.10/site-packages/promptops/query/query.py", line 347, in do_query
    cmd, confirmed = input_loop()
  File "/usr/local/Cellar/promptops-cli/0.1.2/libexec/lib/python3.10/site-packages/promptops/query/query.py", line 333, in input_loop
    results = revise_loop(questions, prev_results)
  File "/usr/local/Cellar/promptops-cli/0.1.2/libexec/lib/python3.10/site-packages/promptops/query/query.py", line 103, in revise_loop
    history_results = hs_task.result()
  File "/usr/local/Cellar/python@3.10/3.10.11/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py", line 449, in result
    raise CancelledError()
concurrent.futures._base.CancelledError

Screenshot 2023-05-24 at 8 56 40 Screenshot 2023-05-24 at 8 58 36

joshualwhite commented 1 year ago

Thanks for the feedback Aleg!

I have a fix for this in progress.

joshualwhite commented 1 year ago

I just pushed out the fix for this! Let me know if you have any problems. Until we do our next brew release, your best bet will be to follow the pip installation instructions.