Skip to content
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

Crash with proposed json config #1

Closed
federico-galli opened this issue Feb 22, 2021 · 7 comments
Closed

Crash with proposed json config #1

federico-galli opened this issue Feb 22, 2021 · 7 comments

Comments

@federico-galli
Copy link

Hi, I am testing your software (successfully with self tweet)
I noticed that python twitter_binance.py crashes if specified (with values or not) the kraken line.
The keys.json with twitter_binance.py works with this format

{ "twitter_keys":{ "consumer_key":"xxx", "consumer_secret":"xxx", "access_token_key":"xxx", "access_token_secret":"xxx" }, "binance_keys":{ "api_key":"xxx", "secret_key":"xxx" } }

@jaimindp
Copy link
Owner

jaimindp commented Feb 22, 2021 via email

@federico-galli
Copy link
Author

federico-galli commented Feb 23, 2021

Hi, I am trading with binance, I have successfully self tested doge/btc buy sell in a 30s timeline.
If I use this format for the json

{ "twitter_keys":{ "consumer_key":"xxx", "consumer_secret":"xxx", "access_token_key":"xxx", "access_token_secret":"xxx" }, "binance_keys":{ "api_key":"xxx", "secret_key":"xxx" } }

it works correctly. If I use the one one on the readme, with the "kraken" like like this
{ "twitter_keys":{ "consumer_key":"XXXXXXXXXXXXXXXXXXXX", "consumer_secret":"XXXXXXXXXXXXXXXXXXXX", "access_token_key":"XXXXXXXXXXXXXXXXXXXX", "access_token_secret":"XXXXXXXXXXXXXXXXXXXX" }, "binance_keys":{ "api_key":"XXXXXXXXXXXXXXXXXXXX", "secret_key":"XXXXXXXXXXXXXXXXXXXX" }, "kraken_keys":{XXXXXX} }

i first get an escape error because it says that kraken_keys needs "somekey" (correcty I think) and if I fill the value it gives

Traceback (most recent call last): File "twitter_binance.py", line 59, in <module> api_keys = json.loads(f.read()) File "/usr/lib64/python3.8/json/__init__.py", line 357, in loads return _default_decoder.decode(s) File "/usr/lib64/python3.8/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib64/python3.8/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ':' delimiter: line 12 column 23 (char 545)

I am not trading with kraken, but if someone trade with kraken AND binance, should have 2 separate config files?
I do understand it's a works in progres, I am just curious. Thanks in advance.

@jaimindp
Copy link
Owner

jaimindp commented Feb 23, 2021 via email

@federico-galli
Copy link
Author

Not exactly, without the double quote I get this error

json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 12 column 20 (char 542)

and with the double quotes, like "kraken_keys":{"XXXXXXX"} i get this other error

json.decoder.JSONDecodeError: Expecting ':' delimiter: line 12 column 28 (char 550)

but it just works if I fully remove the kraken line.

@jaimindp
Copy link
Owner

jaimindp commented Feb 23, 2021 via email

@federico-galli
Copy link
Author

Thanks :-)
I hope you will implement the "new listed coin feature" :-)
Now I hope to test the real thing soon. Such Moon Much Doge!

@jaimindp
Copy link
Owner

jaimindp commented Feb 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants