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

KeyError: 'ATA' #7

Closed
SaLuci opened this issue Jun 3, 2021 · 10 comments
Closed

KeyError: 'ATA' #7

SaLuci opened this issue Jun 3, 2021 · 10 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@SaLuci
Copy link

SaLuci commented Jun 3, 2021

Hey, its me again ;)

the bug mentioned in #5 is fixed, however a new one appeared.

Theres a coin called ATA, which is not "tradable" yet, but you can get them if you stake BNB.
So the EUR/USD Value of those coins will be zero, till they become "tradable". I think thats the Problem.

I will probably take a look at the code myself in the evening, should be a simple fix. (just ignoring coins with a USD value of zero)

@titulebolide
Copy link
Owner

What is the error log? Because I'm not sure if just don't shows up in the tickers or if it is another problem

@titulebolide titulebolide added bug Something isn't working good first issue Good for newcomers labels Jun 5, 2021
@SaLuci
Copy link
Author

SaLuci commented Jun 5, 2021

Sorry, i forgot to add the Error log.

Traceback (most recent call last):
  File "main.py", line 82, in <module>
    cli()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "main.py", line 76, in output
    figname = bot.crypto.plot_symbol(reports, symbol, relative, days)
  File "/home/ubuntu/binance-report-bot/bot/crypto.py", line 124, in plot_symbol
    ticker = report['tickers'][symbol]
KeyError: 'ATA'

here it is.

@titulebolide
Copy link
Owner

Which command were you calling with which options?

@SaLuci
Copy link
Author

SaLuci commented Jun 7, 2021

i was calling python3 main.py output --symbol '*'

@titulebolide
Copy link
Owner

Ha yeah that makes sense. Have you added ATA to the COINS list after setting up the bot?

@SaLuci
Copy link
Author

SaLuci commented Jun 7, 2021

Yeah, i did.
After I got the error message I added ATA, but i didnt change.
if i do python3 main.py output --symbol EOS its working like normal

@titulebolide
Copy link
Owner

You get the error message about missing ATA before having it in the COINS?
Because the routine sums up to this:

if symbol == '*':
  symbol = conf.COINS
[...]
for symbol in symbols:     
  for report in reports:
    ticker = report['tickers'][symbol]

@SaLuci
Copy link
Author

SaLuci commented Jun 7, 2021

wait a sec, let me remove it again from my list....
EDIT: i just removed it and the error disappeared. i think there was a Error before it was "Tradable" on Binance.

@titulebolide
Copy link
Owner

So it might not be the same error than the one you pasted I guess...

@titulebolide
Copy link
Owner

Closing for now, please reopen when you face this issue again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants