mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-03 02:23:05 +00:00
handle JSONDecodeError
This commit is contained in:
4
main.py
4
main.py
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import json
|
||||
import logging
|
||||
import random
|
||||
import threading
|
||||
@@ -71,7 +71,7 @@ class TradeThread(threading.Thread):
|
||||
finally:
|
||||
Session.flush()
|
||||
time.sleep(25)
|
||||
except RuntimeError:
|
||||
except (RuntimeError, json.decoder.JSONDecodeError) as e:
|
||||
TelegramHandler.send_msg('*Status:* Got RuntimeError: ```\n{}\n```'.format(traceback.format_exc()))
|
||||
logger.exception('RuntimeError. Stopping trader ...')
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user