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

ZeroDivisionError: float division by zero #4

Closed
DmytroLitvinov opened this issue May 28, 2021 · 5 comments
Closed

ZeroDivisionError: float division by zero #4

DmytroLitvinov opened this issue May 28, 2021 · 5 comments

Comments

@DmytroLitvinov
Copy link
Contributor

Hi there,
I have cloned project at VPS server and created snapshot of account and run next command:
python main.py --output print and I received next error at console:

Traceback (most recent call last):
  File "main.py", line 54, in <module>
    main()
  File "/home/manager/binance-trade-bot/binance-trade-bot/venv/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/manager/binance-trade-bot/binance-trade-bot/venv/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/manager/binance-trade-bot/binance-trade-bot/venv/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/manager/binance-trade-bot/binance-trade-bot/venv/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "main.py", line 49, in main
    figname = bot.crypto.plot_symbol(reports, plot_symbol)
  File "/home/manager/binance-trade-bot/binance-report-bot/bot/crypto.py", line 92, in plot_symbol
    Y.append(report['total_usdt']/ticker)
ZeroDivisionError: float division by zero
@titulebolide
Copy link
Owner

Hey!
Could you paste your conf.py file?
Please censor your binance keys

@DmytroLitvinov
Copy link
Contributor Author

Here it is:

COINS = ["BTC","ADA","ATOM","BAT","BTT","CAKE","DASH","EOS","ETC","ICX","IOTA",>
CURRENCY = "USB" #Or USD
CURRENCY_SYMBOL = "$"
RICH_PRINTING = True

@titulebolide
Copy link
Owner

You have your currency set at "USB", set it at "USD". That's why it can't find your price. Then delete the /db/crypto.npy file and run again

@DmytroLitvinov
Copy link
Contributor Author

Oops.
Sorry.. Seems like I am not attentive.)
But thanks for supporting :)

@titulebolide
Copy link
Owner

No problem, thanks for the PRs by the way!

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