Open essramos opened 5 years ago
Hi @essramos,
I think it might be a temporary internal server issue for the Shopee Open Platform.
Did you get this so often?
Maybe you can change the timeout params by yourself, however, I think 10 seconds is long enough for the API call.
(My Advice is waiting so patiently until the server become normal again)
# https://github.com/JimCurryWang/python-shopee/blob/master/pyshopee/client.py
def execute(self, uri, method, body=None):
...
...
s = Session()
resp = s.send(prepped, timeout=10)
resp = self._build_response(resp)
return resp
And here are some requests exceptions explainations. https://github.com/kennethreitz/requests/blob/master/requests/exceptions.py
We manually increased the timeout to 15 and we are not seeing timeouts anymore, is there anyway to expose the timeout parameter?
Good Idea, maybe we can try it then.
@essramos,
I have made a PR in https://github.com/JimCurryWang/python-shopee/commit/bbada2fff71f53bfecef2f26f0f26e0bfe88aeaa .
Now we can add timeout params in each of your functions like below.
Maybe you can help me have a test or add this feature in the README document.
# demo
response = shopee.logistic.get_logistics(timeout=15)
print(response)
Thank you! Will try it out and let you know!
Hey Jim,
We are getting these errors, I know it might not relate to the library. But I am wondering if you are getting these as well?
Any idea why this is happening?