Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

Ruud van der Ham's avatar
Ruud van der Ham
Explorer | Level 3
3 months ago

Dropbox download via API unstable under Pyodide (xlwings lite)

I am using the Python dropbox module to download files in pyodide (actually xlwings lite).

I see that quite often a file is not downloaded completely, without even raising an error.

Is there a workaround or patch or ... ?

Uploading files seems to work as expected.

3 Replies

  • I have managed to read reliably from Dropbox by avoiding the dropbox module and using requests directly.

    Under xlwings lite it is all a bit more tricky as you have to do

    pyodide.http.patch_all()

    as well.

    This now implemented in xlwings_utils (www.salabim.org/xlwings_utils).

  • tiffanywalkEr's avatar
    tiffanywalkEr
    Helpful | Level 5
    3 months ago

    This is most likely due to incomplete streaming support in pyodide. You should try downloading in chunks and checking the file size or checksum after the transfer. As the Dropbox SDK itself will not throw an error if the streaming ends prematurely.

  • DB-Des's avatar
    DB-Des
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    3 months ago

    Hi Ruud van der Ham​ 

    We'd be happy to take a further look at your request, but we'll need some more information. Please reply with:

    • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • the full text of any error or unexpected output
    • 5-10 different 'X-Dropbox-Request-Id' response header values encountering the issue

About Discuss Dropbox Developer & API

Node avatar for Discuss Dropbox Developer & API
Make connections with other developers

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!