-
Notifications
You must be signed in to change notification settings - Fork 321
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
ReadTimeout #155
Comments
Can you share what you tried to increase the timeout? If you haven't tried it this way, please try this when making the client:
|
Just endless waiting for a response. May be problem of Dropbox API? |
Thanks for trying that and following up. It sounds like this is due to the API call taking a long time due to the large number of files then. Please try using a smaller |
It doesn't help. I've tried 500, 100 and 50 records. The same error at the end |
Here's my code: def _get_files_from_dropbox(path: str) -> Generator[List[FileMetadata], None, None]:
dropbox = Dropbox(settings.DROPBOX_TOKEN)
try:
result = dropbox.files_list_folder(path, recursive=True)
except ReadTimeout:
# https://github.com/dropbox/dropbox-sdk-python/issues/155
return [],
while True:
files = []
for entry in result.entries:
if isinstance(entry, FileMetadata):
files.append(entry)
if files:
yield files
if not result.has_more:
break
try:
result = dropbox.files_list_folder_continue(result.cursor)
except ReadTimeout:
# https://github.com/dropbox/dropbox-sdk-python/issues/155
return [] |
@pokidovea Thanks for trying that and letting me know! I'm afraid I don't have any other workarounds to offer right now, but I'll check in with the team again on this. I'll follow up here when I have any news. |
@greg-db have there been any updates because we're experiencing the same issue as stated above? |
@jtopel No, unfortunately I don't have an update on this. |
@pokidovea I know you have posted your issue to this forum over a year ago. Did you by chance figure out a solution since then? We are experiencing this same issue right now. |
experiencing the same issue, would love to know if there is a fix |
@akalia25 Thanks for the note! Unfortunately there isn't a simple fix for this, but please refer to my earlier comment for a potential workaround. |
Hello, we still experience the same issue |
@nathanagez Unfortunately there still isn't a simple fix for this, but please refer to my earlier comment for a potential workaround. |
Frankly, it's embarassing that this is still open 5 years later. Either files_list_folder should default to a smaller limit, or the Dropbox client should default to a longer timeout. We shouldn't be having to manage this ourselves, these are exactly the concerns that a good client library should abstract away. |
@SamStephens Thanks for the feedback! I'll pass this along to the team. |
There is an error while retrieving list of files from folder with almost 100k files. But all files were retrieved successfully.
Repeating of call
self.dropbox.files_list_folder_continue(result.cursor)
and enlarging timeout don't help.The text was updated successfully, but these errors were encountered: