whittlem / pycryptobot

Python Crypto Bot (PyCryptoBot)
Apache License 2.0
1.97k stars 741 forks source link

KeyError: 'market' #592

Closed Chezes closed 1 year ago

Chezes commented 2 years ago

Hello, i try to run script on Raspberry pi 4 and also on Windows 10. Here and here i have similar problem:

` C:\pycryptobot-main\BTC-USDT>python3 pycryptobot.py --market BTC-USDT Traceback (most recent call last): File "pandas_libs\hashtable_class_helper.pxi", line 1683, in pandas._libs.hashtable.PyObjectHashTable.get_item KeyError: 'market'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\Users\sarec\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\pandas\core\indexes\base.py", line 2897, in get_loc raise KeyError(key) from err KeyError: 'market' `

Is there any solution for this problem?

Chezes commented 2 years ago

Hello again. It looks like after cloning separate instance of repo for exact exchange (example BTC-USDT) - if I m trying to start bot from this directory I have an error. But if I start bot from main directory it`s ok. So: C:\pycryptobot-main\BTC-USDT>python3 pycryptobot.py --market BTC-USDT # this is not working C:\pycryptobot-main>python3 pycryptobot.py --market BTC-USDT # this is working

Is this meant to be like this or I`m still doing something wrong?

notoriousBLP commented 2 years ago

thats because all of the bot's libraries reside in the root (main) folder and the paths need to stay the same. you can pass in a config file from wherever with --config /path/to/config/file.json and still start the bot from where it needs to be.

On Mon, Nov 29, 2021 at 12:26 PM Chezes @.***> wrote:

Hello again. It looks like after cloning separate instance of repo for exact exchange (example BTC-USDT) - if Im trying to start bot from this directory I have an error. But if I start bot from main directory its ok. So: C:\pycryptobot-main\BTC-USDT>python3 pycryptobot.py --market BTC-USDT # this is not working C:\pycryptobot-main>python3 pycryptobot.py --market BTC-USDT # this is working

Is this meant to be like this or I`m still doing something wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/whittlem/pycryptobot/issues/592#issuecomment-981851153, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGWFMQBERTMS7S3H5AUKADUOOZTBANCNFSM5I66KENA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

TUstudents commented 2 years ago

This 'market' error is also shown, if incompatible options are given in the config.json file, e.g. , if "live" : 0 and "stats" : 1. The error is very general and not specific, not pointing to the problem.