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 after 60 sec while processing files #8629

Closed
1 task done
Puneet-Bajaj-IITM opened this issue Jun 26, 2024 · 2 comments
Closed
1 task done

Error after 60 sec while processing files #8629

Puneet-Bajaj-IITM opened this issue Jun 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Puneet-Bajaj-IITM
Copy link

Describe the bug

When i try processing files, which takes more than a minute, i get this error in chrom console

`Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'abort_controller')
at stream (index.js:2259:10)
at UploadProgress.svelte:41:18
at run (svelte.js:41:9)
at Array.map ()
at svelte.js:3182:48
at flush (svelte.js:2141:5)Understand this error
/queue/data?session_hash=r1p8j140uzi:1

   Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERRORUnderstand this error

index.js:2045 Unexpected error Connection errored out. `

I searched out they instruicted to use enable_queue but didn't solve the problem

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

import gradio as gr

# Gradio interface function
def docx_processor(input_files):
    time.sleep(500000)
    return input_files


# Define Gradio interface
iface = gr.Interface(
    fn=docx_processor,
    inputs=gr.Files(label="Upload Files"),  # Corrected type to "filepath"
    outputs=gr.Files(label="Processed Files"),
    title="DOCX Processor",
    live=True,
    description="Process a DOCX file by converting it to Markdown, running through a language model, and converting back to DOCX in batches."
)


iface.launch(debug=True)

Screenshot

No response

Logs

No response

System Info

Name: gradio
Version: 4.37.1
Summary: Python library for easily interacting with trained machine learning models
Home-page: 
Author: 
Author-email: Abubakar Abid <gradio-team@huggingface.co>, Ali Abid <gradio-team@huggingface.co>, Ali Abdalla <gradio-team@huggingface.co>, Dawood Khan <gradio-team@huggingface.co>, Ahsen Khaliq <gradio-team@huggingface.co>, Pete Allen <gradio-team@huggingface.co>, Ömer Faruk Özdemir <gradio-team@huggingface.co>, Freddy A Boulton <gradio-team@huggingface.co>, Hannah Blair <gradio-team@huggingface.co>
License: 
Location: /usr/local/python/3.10.13/lib/python3.10/site-packages
Requires: aiofiles, altair, fastapi, ffmpy, gradio-client, httpx, huggingface-hub, importlib-resources, jinja2, markupsafe, matplotlib, numpy, orjson, packaging, pandas, pillow, pydantic, pydub, python-multipart, pyyaml, ruff, semantic-version, tomlkit, typer, typing-extensions, urllib3, uvicorn
Required-by:

Severity

Blocking usage of gradio

@Puneet-Bajaj-IITM Puneet-Bajaj-IITM added the bug Something isn't working label Jun 26, 2024
@freddyaboulton
Copy link
Collaborator

So this happens while the docx_processor function is running or during the upload. Asking cause the console error mentions UploadProgress but if it happens after the upload then it may not be relevant to the root cause of the issue.

@Puneet-Bajaj-IITM
Copy link
Author

I was using github codespaces, but I found out code works in collab. There may be some issue when using codespace

This issue was closed.
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

2 participants