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

dcc.Upload errors with big files #2869

Open
celia-lm opened this issue May 28, 2024 · 5 comments
Open

dcc.Upload errors with big files #2869

celia-lm opened this issue May 28, 2024 · 5 comments
Labels
bug something broken feature something new P3 not needed for current cycle

Comments

@celia-lm
Copy link

Context

Issues

  • If I run the app with gunicorn or in my local env, some time after I upload the file the tab freezes or I get an internal server error (NOT a timeout because dcc.Upload has some kind of async functionality). > This is similar to what this issue describes: error with dcc.Upload() with large files #1728
Screenshot 2024-05-28 at 10 13 32 - If I run the app with Python in a Dash Enterprise workspace, I get a callback error which is kind of weird. If you look at the callback code and the print statements in the terminal, we only get two values despite having three Inputs. The first one is probably an empty string or list, which causes the if statement to “fail” (since list_of_contents is not None), so the error we see is related to code after the if statement. The real problem is that, even if the filenames and dates get passed correctly, the content is empty > This issue has been described before in the forum: (https://community.plotly.com/t/upload-500mb-csv-but-content-is-empty/83297. Screenshot error Screenshot callback code

Additional context

  • I've tried dash-uploader (link) and it works okay but I’m concerned about (1) privacy (all files are accessible by all users by default, as opposed to session-specific storage) and (2) memory (how does saving many big files affect the app memory/performance)
  • dash-uploader is not an official component and it’s not maintained, which raises some concerns regarding production environment.

Request

  • dcc.Upload being able to handle big files (500MB, >1GB, etc).
  • If the file is not been processed correctly (list_of_contents is empty) show a more helpful error.
@Coding-with-Adam Coding-with-Adam added the feature something new label May 28, 2024
@CNFeffery
Copy link
Contributor

@celia-lm I suggest you use other upload components with rich features, cooperate with flask or fastapi streaming file upload service to achieve more efficient file upload function:

https://fac.feffery.tech/AntdUpload
https://fac.feffery.tech/AntdDraggerUpload

@gvwilson gvwilson self-assigned this Jun 3, 2024
@Coding-with-Adam
Copy link

@CNFeffery
I see you promoting the feffery-antd-components fairly often.

Are you able to translate those docs to English?

For example, in the comment above you suggest Celia use the AntdUpload, but it's all in a different language, which will make it very hard to understand how to use.

image

@CNFeffery
Copy link
Contributor

@Coding-with-Adam That would be a huge project to translate so many documents, I suggest to use some browser translate extensions in current stage(such as https://immersivetranslate.com/ or other AI-driven tools), which we often use to translate English to other language.

@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P3 not needed for current cycle bug something broken labels Aug 13, 2024
@gvwilson gvwilson changed the title [BUG] dcc.Upload errors with big files dcc.Upload errors with big files Aug 13, 2024
@CNFeffery
Copy link
Contributor

@Coding-with-Adam The official website of fac has begun developing features related to the internationalization of documentation. Currently, the documentation is being translated one by one. When users visit https://fac.feffery.tech/, the website will automatically recognize the language preference of the user's computer and render the content in Chinese or English accordingly. Users can also switch languages manually from the top right corner. For example: https://fac.feffery.tech/AntdButton. For the implementation principles and contribution guidelines of the internationalization of the fac official website, please refer to: CNFeffery/feffery-antd-docs#166.
image

@Coding-with-Adam
Copy link

Like magic :)
Thanks for the update, @CNFeffery . This automated translation is going to help a lot of community members.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken feature something new P3 not needed for current cycle
Projects
None yet
Development

No branches or pull requests

4 participants