pycryptobot icon indicating copy to clipboard operation
pycryptobot copied to clipboard

Got this error on Telegram: Bot for ADA-EUR got an exception:TypeError('Passing PeriodDtype data is invalid.

Open fedec65 opened this issue 4 years ago • 4 comments

Describe the bug Got this error on Telegram:

Bot for ADA-EUR got an exception: TypeError('Passing PeriodDtype data is invalid. Use data.to_timestamp() instead')

It looks like an issue getting the timestamp, any ideas?

I got the error just after the BOT completed a BUY.

Desktop (please complete the following information):

  • OS: MacOS Catalina

fedec65 avatar Aug 19 '21 07:08 fedec65

TypeError('Passing PeriodDtype data is invalid. Use data.to_timestamp() instead') Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pandas/core/arrays/datetimes.py", line 2122, in maybe_convert_dtype raise TypeError( TypeError: Passing PeriodDtype data is invalid. Use data.to_timestamp() instead

fedec65 avatar Aug 19 '21 17:08 fedec65

Did the error in the bot console provide anymore information where this happened? That error doesn't tell me.

whittlem avatar Aug 19 '21 17:08 whittlem

Iz happened when the BOT executed the BUY order. BUY was succesful but then the BOT crashed with that error. I'm sure it will happen again i will copy the full error message.

fedec65 avatar Aug 19 '21 19:08 fedec65

Here is my log of the same crash and setting

`2021-08-16 19:37:19 INFO     --------------------------------------------------------------------------------
2021-08-16 19:37:19 INFO     |                              Python Crypto Bot                               |
2021-08-16 19:37:19 INFO     --------------------------------------------------------------------------------
2021-08-16 19:37:19 INFO     |                Release : v3.2.8                                              |
2021-08-16 19:37:19 INFO     --------------------------------------------------------------------------------
2021-08-16 19:37:19 INFO     |               Bot Mode : LIVE - live trades using your funds!                |
2021-08-16 19:37:19 INFO     |            Bot Started : 2021-08-16 19:37:19.413618                          |
2021-08-16 19:37:19 INFO     ================================================================================
2021-08-16 19:37:19 INFO     |           Sell At Loss : False  --sellatloss False                           |
2021-08-16 19:37:19 INFO     |     Sell At Resistance : False  --sellatresistance                           |
2021-08-16 19:37:19 INFO     |        Trade Bull Only : False  --disablebullonly                            |
2021-08-16 19:37:19 INFO     |          Buy Near High : False  --disablebuynearhigh                         |
2021-08-16 19:37:19 INFO     |           Use Buy MACD : True  --disablebuymacd                              |
2021-08-16 19:37:19 INFO     |            Use Buy EMA : False  --disablebuyema                              |
2021-08-16 19:37:19 INFO     |            Use Buy OBV : False  --disablebuyobv                              |
2021-08-16 19:37:19 INFO     |      Use Buy Elder-Ray : True  --disablebuyelderray                          |
2021-08-16 19:37:19 INFO     |     Sell Fibonacci Low : False  --disablefailsafefibonaccilow                |
2021-08-16 19:37:19 INFO     |   Candlestick Reversal : False  --disableprofitbankreversal                  |
2021-08-16 19:37:19 INFO     |               Telegram : True  --disabletelegram                             |
2021-08-16 19:37:19 INFO     |                    Log : True  --disablelog                                  |
2021-08-16 19:37:19 INFO     |                Tracker : True  --disabletracker                              |
2021-08-16 19:37:19 INFO     |       Auto restart Bot : True  --autorestart                                 |
2021-08-16 19:37:19 INFO     ================================================================================
2021-08-16 19:37:20 INFO     *** smart switch from granularity 3600 (1 hour) to 900 (15 min) ***
2021-08-16 19:37:23 DEBUG    *** Buy Signal ***
2021-08-16 19:37:23 DEBUG    ema12gtema26co: False
2021-08-16 19:37:23 DEBUG    macdgtsignal: True
2021-08-16 19:37:23 DEBUG    goldencross: True
2021-08-16 19:37:23 DEBUG    obv_pc: 1.49
2021-08-16 19:37:23 DEBUG    eri_buy: True
2021-08-16 19:37:23 DEBUG    last_action: SELL
2021-08-16 19:37:23 INFO     2021-08-16 11:00:00 | BTCBUSD | 15m | Close: 47518.7300 | ^ MACD: 229.2647 > 223.9841 ^ | ERI: buy | BUY | Last Action: SELL
2021-08-16 19:37:25 INFO     2021-08-16 11:00:00 | BTCBUSD | 15m | Close: 47518.7300 | BUY
2021-08-16 19:37:25 INFO     BTC balance before order: 0.0
2021-08-16 19:37:25 INFO     BUSD balance before order: 1013.556
2021-08-16 19:37:26 DEBUG    {'symbol': 'BTCBUSD', 'side': 'BUY', 'type': 'MARKET', 'quantity': 0.021304, 'recvWindow': 5000}
2021-08-16 19:37:26 DEBUG    {'symbol': 'BTCBUSD', 'orderId': 3118434719, 'orderListId': -1, 'clientOrderId': 'MbkdjX1304ESEMWVDVHHX9', 'transactTime': 1629113846785, 'price': '0.00000000', 'origQty': '0.02130400', 'executedQty': '0.02130400', 'cummulativeQuoteQty': '1012.50817768', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'BUY', 'fills': [{'price': '47526.67000000', 'qty': '0.01677300', 'commission': '0.00138396', 'commissionAsset': 'BNB', 'tradeId': 221180692}, {'price': '47526.67000000', 'qty': '0.00453100', 'commission': '0.00037383', 'commissionAsset': 'BNB', 'tradeId': 221180693}]}
2021-08-16 19:37:27 INFO     BTC balance after order: 0.0213
2021-08-16 19:37:27 INFO     BUSD balance after order: 1.0478
2021-08-16 19:37:57 CRITICAL Restarting application after exception: TypeError('Passing PeriodDtype data is invalid. Use `data.to_timestamp()` instead')
2021-08-16 19:38:00 INFO     last_action change detected from SELL to BUY
2`

jegb avatar Aug 20 '21 13:08 jegb