Error 500 when using dcc.Upload()

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!

Tips to fix-

Try Reloading the Page.
Clear Your Browser Cache.
Check Your Server Logs.
Error Establishing a Database Connection.
Check Your Plugins and Themes.
Reinstall WordPress Core.
Permissions Error

Regards,
Rachel Gomez