plotly / plotly/dash

error with dcc.Upload() with large files

Open
#1,728 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P3
Dominant language
Python
Stars
24.4k
Forks
2.3k
Avg merge
2d 7h
Merged PRs (30d)
13

Description

Hello,
I used dcc.upload() to handle the file upload. The file can be uploaded and read locally on the localhost.
But after the deployment, I received POST 500 internal server error. And the message received is:

{message: “Callback error updating output-data-upload.children”, html: "<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 3.2 Final/…ded or there is an error in the application.”}

The console gives the following error message:

MacBook aciseagentd[398]: Function: getIpAndMacList Thread Id: 0xB951E00 File: /tmp/build/thehoff/Negasonic_MR30.610359133743/Negasonic_MR3/posture/ise/libnaccommon/SystemInfo.cpp Line: 123 Level: debug :: MAC List=AC:DE:48:00:11:22,A6:83:E7:AB:31:8B,A4:83:E7:AB:31:8B,A4:83:E7:AB:31:8B,D6:09:11:05:B2:65,D6:09:11:05:B2:65,82:8B:CE:47:04:01,82:8B:CE:47:04:00,82:8B:CE:47:04:05,82:8B:CE:47:04:04,82:8B:CE:47:04:01,AC:DE:48:00:11:22,AC:DE:48:00:11:22,AC:DE:48:00:11:22,AC:DE:48:00:11:22, IP List=fe80::aede:48ff:fe00:1122,0.0.0.0,10.37.220.165,fe80::ccd:9606:4d4b:bbbd,fe80::d409:11ff:fe05:b265,fe80::d409:11ff:fe05:b265,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,0.0.0.0,fe80::5bd:49b5:4f86:82c0,fe80::9d3f:f2ce:b9c6:9fff,fe80::ec04:1c92:682:6cde,fe80::b9ef:8e2c:8eb5:6057, saved MAC=AC:DE:48:00:11:22
MacBook aciseagentd[398]: Function: collectNoMntTargets Thread Id: 0xB951E00 File: /tmp/build/thehoff/Negasonic_MR30.610359133743/Negasonic_MR3/posture/ise/libswift/SwiftHttpRunner.cpp Line: 972 Level: debug :: adapter utun3, operStatus=1, wifi=no

The code related to this error message has been attached below as a screenshot, where output-data-upload is the id of a html.Div() component.
And the upload-data is the id of the dcc.Upload() component.
In the parse_contents() , I’m trying to filter for xls or xlsx files only. in the update_output() , I’m trying to display the name of the uploaded file.

I’ve looked up the 500 error code and have tried to change some permission settings but nothing really worked out.

I really appreciate the help!
Screenshot 2021-08-25 at 10 06 02 AM

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the dcc.Upload behavior on localhost with the deployed app, focusing on the POST 500 response and the large-file case. Review the parse_contents() and update_output() callbacks shown in the issue, then reproduce the deployment failure and determine what change allows the uploaded XLS or XLSX file name to be displayed successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.