You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue while using the upload endpoint of the DocsGPT API. After successfully uploading a file and receiving the response with the status "ok" and a task ID, I observed an error in the worker logs. The error message states the following:
[2023-11-29 15:31:49,384: WARNING/ForkPoolWorker-1] inputs/5203382281/file_84.pdf
[2023-11-29 15:31:49,424: WARNING/ForkPoolWorker-1] <Response [200]>
[2023-11-29 15:31:49,431: WARNING/ForkPoolWorker-1] Grouping small documents
[2023-11-29 15:31:49,432: WARNING/ForkPoolWorker-1] Separating large documents
[2023-11-29 15:31:49,436: ERROR/ForkPoolWorker-1] Task application.api.user.tasks.ingest[eade116a-470f-4e9f-a69f-4c5f084151f6] raised unexpected: IndexError('list index out of range')
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 734, in protected_call
return self.run(*args, **kwargs)
File "/app/application/api/user/tasks.py", line 6, in ingest
resp = ingest_worker(self, directory, formats, name_job, filename, user)
File "/app/application/worker.py", line 94, in ingest_worker
call_openai_api(docs, full_path, self)
File "/app/application/parser/open_ai_func.py", line 38, in call_openai_api
docs_init = [docs[0]]
IndexError: list index out of range
It seems that the error occurred when the worker was trying to process the file file_84.pdf. The IndexError indicates that the list index was out of range in the call_openai_api function.
Could you please investigate this issue and provide a solution? Let me know if you need any additional information. Thank you!
👟 Reproduction steps
Send a file using the upload endpoint.
Receive an "ok" response with a task_id.
👍 Expected behavior
I expected the file to be processed without any errors and to receive a successful response.
👎 Actual Behavior with Screenshots
The worker encountered an IndexError: list index out of range while processing the file.
💻 Operating system
Linux
What browsers are you seeing the problem on?
No response
🤖 What development environment are you experiencing this bug on?
Docker
🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)
No response
📃 Provide any additional context for the Bug.
No response
📖 Relevant log output
No response
👀 Have you spent some time to check if this bug has been raised before?
I checked and didn't find similar issue
🔗 Are you willing to submit PR?
None
🧑⚖️ Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
📜 Description
I encountered an issue while using the upload endpoint of the DocsGPT API. After successfully uploading a file and receiving the response with the status "ok" and a task ID, I observed an error in the worker logs. The error message states the following:
[2023-11-29 15:31:49,384: WARNING/ForkPoolWorker-1] inputs/5203382281/file_84.pdf
[2023-11-29 15:31:49,424: WARNING/ForkPoolWorker-1] <Response [200]>
[2023-11-29 15:31:49,431: WARNING/ForkPoolWorker-1] Grouping small documents
[2023-11-29 15:31:49,432: WARNING/ForkPoolWorker-1] Separating large documents
[2023-11-29 15:31:49,436: ERROR/ForkPoolWorker-1] Task application.api.user.tasks.ingest[eade116a-470f-4e9f-a69f-4c5f084151f6] raised unexpected: IndexError('list index out of range')
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 451, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/celery/app/trace.py", line 734, in protected_call
return self.run(*args, **kwargs)
File "/app/application/api/user/tasks.py", line 6, in ingest
resp = ingest_worker(self, directory, formats, name_job, filename, user)
File "/app/application/worker.py", line 94, in ingest_worker
call_openai_api(docs, full_path, self)
File "/app/application/parser/open_ai_func.py", line 38, in call_openai_api
docs_init = [docs[0]]
IndexError: list index out of range
It seems that the error occurred when the worker was trying to process the file file_84.pdf. The IndexError indicates that the list index was out of range in the call_openai_api function.
Could you please investigate this issue and provide a solution? Let me know if you need any additional information. Thank you!
👟 Reproduction steps
👍 Expected behavior
I expected the file to be processed without any errors and to receive a successful response.
👎 Actual Behavior with Screenshots
The worker encountered an IndexError: list index out of range while processing the file.
💻 Operating system
Linux
What browsers are you seeing the problem on?
No response
🤖 What development environment are you experiencing this bug on?
Docker
🔒 Did you set the correct environment variables in the right path? List the environment variable names (not values please!)
No response
📃 Provide any additional context for the Bug.
No response
📖 Relevant log output
No response
👀 Have you spent some time to check if this bug has been raised before?
🔗 Are you willing to submit PR?
None
🧑⚖️ Code of Conduct
The text was updated successfully, but these errors were encountered: