"Invalid string length" when uploading files with dcc.Upload(multi=True,...)

I got this error when uploading multiple files with dcc.Upload(). I wonder what that error means, where it comes from and how to fix it.
Does it mean the file is corrupt?

Thanks


RangeError: Invalid string length

    at JSON.stringify (<anonymous>)

    at handleServerside (http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:93347:19)

    at http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:93538:11

    at new Promise (<anonymous>)

    at executeCallback (http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:93513:21)

    at http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:99079:100

    at _map (http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:75415:19)

    at map (http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:78219:78)

    at http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:74584:15

    at f2 (http://localhost:8050/_dash-component-suites/dash_renderer/dash_renderer.v1_8_3m1604684830.dev.js:74400:14)
1 Like

I did face the same issue. mail8 did you find how to fix the issue ?

1 Like

No, I did not find a solution so far.

From my research on the error, i notice that the size of files i uploaded are big and it is leading to the Invalid String length error.

When i uploaded smaller size filles i didnt get the error.

Let me know if you find some further info .

Thank you mail8

I guess it is a shortcoming of the Upload component it is made for a small number of small files.

This might help: GitHub - np-8/dash-uploader: Upload large data files using Dash for Python