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

Better handling for MM2.json config not found error #8

Open
damascene opened this issue Apr 2, 2024 · 0 comments
Open

Better handling for MM2.json config not found error #8

damascene opened this issue Apr 2, 2024 · 0 comments

Comments

@damascene
Copy link

When I launch the bot without having a config file MM2.json in pytomicDEX_makerbot/config/ I get the following error:

FileNotFoundError: Komodefi SDK config not found at /home/user/pytomicDEX_makerbot/config/MM2.json!

Traceback

coins file not found, downloading...
Traceback (most recent call last):
  File "/home/user/pytomicDEX_makerbot/makerbot.py", line 10, in <module>
    from models import Tui
  File "/home/user/pytomicDEX_makerbot/models.py", line 1069, in <module>
    table = Table()
            ^^^^^^^
  File "/home/user/pytomicDEX_makerbot/models.py", line 447, in __init__
    self.dex = Dex()
               ^^^^^
  File "/home/user/pytomicDEX_makerbot/models.py", line 45, in __init__
    self.api = pykomodefi.KomoDeFi_API(config=self.mm2_config)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/top/.cache/pypoetry/virtualenvs/trading-5fBmn1aJ-py3.11/lib/python3.11/site-packages/pykomodefi/models.py", line 10, in __init__
    self.set_config(config)
  File "/home/top/.cache/pypoetry/virtualenvs/trading-5fBmn1aJ-py3.11/lib/python3.11/site-packages/pykomodefi/models.py", line 39, in set_config
    raise FileNotFoundError(f"Komodefi SDK config not found at {config}!")
FileNotFoundError: Komodefi SDK config not found at /home/user/pytomicDEX_makerbot/config/MM2.json!

I think printing an error and suggestion to get the file would be better.

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

1 participant