Synapse Python Client -> Sign Up error -> Timestamp in request is out of date
javierpastorfernandez opened this issue · 2 comments
Operating system
OS: Windows 10
Client version
---> >>> import synapseclient
synapseclient.version
'2.5.0'
Description of the problem
I try to login using:
import synapseclient
syn = synapseclient.Synapse()
syn.login('my_username', 'my_password')
but synapse always throws the following error:
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\client.py", line 434, in login
profile = self.getUserProfile(refresh=True)
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\core\utils.py", line 629, in memoizer
cache[key] = obj(*args, **kwargs)
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\client.py", line 570, in getUserProfile
return UserProfile(**self.restGET(uri, headers={'sessionToken': sessionToken} if sessionToken else None))
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\client.py", line 3887, in restGET
response = self._rest_call('get', uri, None, endpoint, headers, retryPolicy, requests_session, **kwargs)
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\client.py", line 3871, in _rest_call
self._handle_synapse_http_error(response)
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\client.py", line 3841, in _handle_synapse_http_error
exceptions._raise_for_status(response, verbose=self.debug)
File "C:\Users\javie\anaconda3\envs\dl\lib\site-packages\synapseclient\core\exceptions.py", line 160, in _raise_for_status
raise SynapseHTTPError(message, response=response)
synapseclient.core.exceptions.SynapseHTTPError: 401 Client Error:
Timestamp in request, 2021-11-25T10:44:54.000Z, is out of date.
Obviously, in syn.login('my_username', 'my_password'), I have introduced my real credentials, which I have checked several times. The client always shows the same error!
Hi everybody!
Solved! Make sure that your time and time zone settings in your computer are the correct ones!
Ex in windows: To set your time and time zone in Windows 10, go to Start > Settings > Time & language > Date & time