Closed c-rei closed 1 year ago
Hi @c-rei Can you provide a sample of the code you are trying to run? Does this problem occur consistently after 2 hours or only sometimes?
Please make sure your environment (e.g. network, proxy configuration) is not interfering with the code you are trying to run. You can also try increasing the number of retries and see if that helps. - https://github.com/box/box-python-sdk/blob/main/docs/usage/configuration.md#max-retry-attmepts
Hi sir This problem occurs after 2 hours and sometimes, even immediately after execution. My code samples like this,
And I have another problem, it occurs after long run with same code. (no proxy environment)
('Connection aborted.', TimeoutError(10060, 'A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond', None, 10060, None))
So looking at the errors you are getting, the fact that the problem is non-deterministic and after talking with other team members I think that it is most likely a client or server problem. I don't see much impact the sdk can have. There are a few steps you can take to try to solve your issue:
Thanks your advise. But I'm not sure your "wrapping api calls" means. To try wrapping api calls in a try/except clause, I want to do like a sample below? num = 0 while True: try: a_folder = client.folder(folder_id="123456789").get() break except requests.RequestException: if num < 5: num += 1 continue else: raise except Exception: raise
I want to get some information of my contents, so I do tow steps like below.
1 step: I got a contents list, and output them to csv file with item name, id, and type. I used "items = folder.get_items()", and with recursion route, I can got 40,000 items.
2 step: I want to get the collaborations and shared links using "item.get_collaborations()" and "item.shared_link" through my csv file that got on step one.
After about 2 hours, I got the error like that "'Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)". So I can't complete my process.
I want to known what's wrong with my process. How can I avoid this error.
Versions Used
Python SDK: 3.2.0 Python: 3.8.8 and my csv file.