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

Error while parsing the file '<bytes/buffer>': Event loop is closed #661

Open
rajasami156 opened this issue Mar 28, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@rajasami156
Copy link

rajasami156 commented Mar 28, 2025

I'm getting this issue :
I'm not sure what might be the issue for this, I'm using Fastapi for this application.
When I reload the homepage twice or thrice and then run it, it works. but once it is done running and then I run it again it gives this error. I'm using openai .
Please help.

LOGS:

INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:7000/ (Press CTRL+C to quit)
INFO:main11:Homepage rendered successfully.
INFO: 127.0.0.1:37484 - "GET / HTTP/1.1" 200 OK
INFO: 127.0.0.1:37484 - "GET /favicon.ico HTTP/1.1" 404 Not Found
INFO:httpx:HTTP Request: POST https://api.cloud.llamaindex.ai/api/parsing/upload "HTTP/1.1 200 OK"
Started parsing the file under job_id 412b8ad7-8851-4e62-a0e6-3c327c5c1b3f
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/412b8ad7-8851-4e62-a0e6-3c327c5c1b3f "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/412b8ad7-8851-4e62-a0e6-3c327c5c1b3f "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: GET https://api.cloud.llamaindex.ai/api/parsing/job/412b8ad7-8851-4e62-a0e6-3c327c5c1b3f/result/text "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO: 127.0.0.1:37484 - "POST /upload-pdf HTTP/1.1" 200 OK

INFO:main11:Homepage rendered successfully.
INFO: 127.0.0.1:37490 - "GET / HTTP/1.1" 200 OK
Error while parsing the file '<bytes/buffer>': Event loop is closed
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions "HTTP/1.1 200 OK"
INFO: 127.0.0.1:36302 - "POST /upload-pdf HTTP/1.1" 200 OK

As you can see it works well for the first time but when I refresh the page try again it doesn't

@rajasami156 rajasami156 added the bug Something isn't working label Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant