TheR1D / shell_gpt

A command-line productivity tool powered by AI large language models like GPT-4, will help you accomplish your tasks faster and more efficiently.
MIT License
9.28k stars 724 forks source link

Idk, it won't even start #351

Closed DDevisi closed 9 months ago

DDevisi commented 11 months ago

When i type "sgpt" in my terminal, i getting this:

Traceback (most recent call last):
  File "/home/syntaxis/.local/bin/sgpt", line 5, in <module>
    from sgpt import cli
  File "/home/syntaxis/.local/lib/python3.10/site-packages/sgpt/__init__.py", line 1, in <module>
    from .app import main as main
  File "/home/syntaxis/.local/lib/python3.10/site-packages/sgpt/app.py", line 9, in <module>
    from sgpt.config import cfg
  File "/home/syntaxis/.local/lib/python3.10/site-packages/sgpt/config.py", line 83, in <module>
    cfg = Config(SHELL_GPT_CONFIG_PATH, **DEFAULT_CONFIG)
  File "/home/syntaxis/.local/lib/python3.10/site-packages/sgpt/config.py", line 40, in __init__
    self._read()
  File "/home/syntaxis/.local/lib/python3.10/site-packages/sgpt/config.py", line 72, in _read
    key, value = line.strip().split("=")
ValueError: not enough values to unpack (expected 2, got 1)
BeCaDRI commented 10 months ago

remove all empty lines in your config file. Then check that the open AI api key is in quotes

OPENAI_API_KEY="your-key"

moritztim commented 9 months ago

mine isn't in quotes and it works. When I add new lines it gives me the error tho.