-
-
Notifications
You must be signed in to change notification settings - Fork 86
Bot does not stop with Ctrl+C? #27
Comments
tudor pls |
Hey hey, so you see how 'sleep(15)' is outside the scope of 'try'? You want to put it inside, so the KeyboardInterrupt will work while the bot is waiting.
|
Maybe try these SO answers: |
I think it's more of an issue with your logging of "Executed the bot loop. Now waiting...". Look at this: After ctrl+c the first time you can see it prints the "inside except". However, after that, your logging is still spinning with the "Executed the bot loop. Now waiting..." and even if I try ctrl+c again, it doesn´t react in any way. |
Oh that makes sense, it's probably to do with yaspin (the spinner/logger) |
While you're looking into that, would it also make sense to look into the following? When the bot places a sell order, it repeatedly prints out "OPEN SELL order on...": It just keeps filling up the terminal with it. Wouldn´t it be better to just print it once and then if anything new happens, print the new change? |
Hello,
I have the typical loop in my file:
However, when I hit ctrl+c the terminal appears to react but not actually stop the program:
Am I misunderstanding something?
Thanks
The text was updated successfully, but these errors were encountered: