-
Notifications
You must be signed in to change notification settings - Fork 731
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
Unknown errors #231
Comments
For some reason the JSON decoding is failing. This library doesn't have great error handling yet - to get an idea of what's going on, you could edit def get_account(self, account_id):
r = requests.get(self.url + '/accounts/' + account_id, auth=self.auth, timeout=self.timeout)
r.raise_for_status()
try:
return r.json()
except Error as e:
print(e) This is a quick and dirty test that I haven't tried to run, but this should provide a bit more info when it crashes. Usually GDAX provides an informative error message when it denies a request, so hopefully this captures it. |
Alright, I'll post my findings when I get them. As I come across error conditions I'll add the error handling to the various functions I'm using, thank you for the advice. |
Please follow PR #260 for updates on this. |
Hello,
This may or may not be a gdax-python issue and I'm hoping someone can help me understand what is going on. I am writing a script that pulls data from gdax every few seconds, using a combination of get_product_ticker, get_account, and other calls. Every 20 minutes or so my script crashes with the following traceback:
Time elapsed: -1199.2530570030212
Traceback (most recent call last):
File "test.py", line 73, in
eth_account = auth_client.get_account("1f3aee21-bd3b-42cd-899c-51cb2a648947")
File "C:\ProgramData\Anaconda3\lib\site-packages\gdax-1.0.6-py3.6.egg\gdax\authenticated_client.py", line 27, in get_account
File "C:\ProgramData\Anaconda3\lib\site-packages\requests\models.py", line 850, in json
return complexjson.loads(self.text, **kwargs)
File "C:\ProgramData\Anaconda3\lib\json_init_.py", line 354, in loads
return _default_decoder.decode(s)
File "C:\ProgramData\Anaconda3\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\ProgramData\Anaconda3\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The line that fails is different each time, the only consistency is that it is a function of gdax-python. Any thoughts?
Thanks,
Scott
The text was updated successfully, but these errors were encountered: