Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

IndexError: list index out of range #41

Closed
1 of 2 tasks
harrisongoeldner opened this issue Mar 27, 2023 · 2 comments
Closed
1 of 2 tasks

IndexError: list index out of range #41

harrisongoeldner opened this issue Mar 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@harrisongoeldner
Copy link

harrisongoeldner commented Mar 27, 2023

I had a look at the troubleshooting section

  • Yes
  • No

Describe the bug
When I type cf only two options show up and debug shows that ChatFred is erroring.

To Reproduce
Steps to reproduce the behavior:

  1. Type cf in Alfred prompt

Expected behavior
I expected to be able to search ChatGPT.

Screenshots
image
image

Alfred's debug log

 VARIABLES:{
  always_copy_to_clipboard = "1"
  always_speak = "0"
  api_key = "sk-************************************************" # Removed for privacy
  cf_aliases = "joke=tell me a joke;"
  chat_gpt_model = "gpt-3.5-turbo"
  frequency_penalty = "0.0"
  history_length = "3"
  history_type = "search"
  image_size = "512"
  instruct_gpt_model = "text-davinci-003"
  jailbreak_prompt = ""
  max_tokens = ""
  presence_penalty = "0.0"
  save_to_file = "0"
  save_to_file_dir = "/Users/***" # Removed for privacy
  show_loading_indicator = "1"
  show_notifications = "1"
  temperature = "0"
  top_p = "1"
  transformation_prompt = "Write the text so that each letter is replaced by its successor in the alphabet."
  user_prompt = ""
}
RESPONSE:

ERROR: ChatFred[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/ha****************/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.7C443488-F6BE-4801-8427-5835156D12BB/src/history_manager.py", line 77, in <module>
    provide_history()
  File "/Users/ha*****************/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.7C443488-F6BE-4801-8427-5835156D12BB/src/history_manager.py", line 42, in provide_history
    if row[3] == "0":
       ~~~^^^
IndexError: list index out of range
@harrisongoeldner harrisongoeldner added the bug Something isn't working label Mar 27, 2023
@chrislemke
Copy link
Owner

Hi @harrisongoeldner!
Thanks for reporting this issue. Could you check if removing the ChatFred_ChatGPT.csv helps?

@neo-anderson
Copy link

I had this same issue. I had to change if row[3] == 0 to if len(row) > 3 and row[3] == 0 to make it work. I do not see that csv file in the workflow folder

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants