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

[Bug] IndexError: list index out of range #546

Closed
todorp opened this issue May 9, 2024 · 0 comments
Closed

[Bug] IndexError: list index out of range #546

todorp opened this issue May 9, 2024 · 0 comments

Comments

@todorp
Copy link

todorp commented May 9, 2024

Describe the bug

A clear and concise description of what the bug is.

Exception in thread Thread-5 ():
Traceback (most recent call last):
File "C:\ProgramData\anaconda3\envs\devika\Lib\threading.py", line 1045, in _bootstrap_inner
self.run()
File "C:\ProgramData\anaconda3\envs\devika\Lib\threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "D:\aWork\GPTs\devika\devika.py", line 89, in
thread = Thread(target=lambda: agent.subsequent_execute(message, project_name))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\aWork\GPTs\devika\src\agents\agent.py", line 232, in subsequent_execute
code = self.feature.execute(
^^^^^^^^^^^^^^^^^^^^^
File "D:\aWork\GPTs\devika\src\services\utils.py", line 14, in wrapper
result = func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "D:\aWork\GPTs\devika\src\agents\feature\feature.py", line 121, in execute
valid_response = self.validate_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\aWork\GPTs\devika\src\agents\feature\feature.py", line 53, in validate_response
current_file = line.split("`")[1].strip()
~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

How To Reproduce

Steps to reproduce the behavior (example):

  1. {steps_1} Prompt : "write a python function to produce a paretto optimal set in a pandas datafreame from an input data frame and a list of input columns."
  2. {steps_2} Prompt: "sklearn doesn't have ParetoEnvelope"
  3. {steps_3} reproduced

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots and logs

must share logs from frontend or backend. also If applicable, add screenshots to help explain your problem.
error message pasted
log attached

Configuration

- OS:  Windows fully patched to date
- Python version fully patched to date
- Node version fully patched to date
- bun version fully patched to date
- search engine: duckduckgo
- Model: Ollama LLama3

devika_agent.log

Additional context

Add any other context about the problem here.

kgott added a commit to kgott/devika that referenced this issue May 10, 2024
It seems that the line needed to be split on ":" instead of "`", because there will always be a colon when the line starts with "File: ".
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

1 participant