pycryptobot icon indicating copy to clipboard operation
pycryptobot copied to clipboard

Python error when --sim is used

Open wtc0der opened this issue 3 years ago • 5 comments
trafficstars

Describe the bug Error : 2022-03-10 23:45:00 | JASMYUSDT | 15m | Close: 0.0169 | BUY Resistance level of 0.0172 formed at 2022-03-10 21:15:00 Fibonacci Retracement Levels:{'ratio0_286': 0.01, 'ratio0': 0.01} TypeError("cannot concatenate object of type '<class 'dict'>'; only Series and DataFrame objs are valid")

when i run simulation

To Reproduce Steps to reproduce the behavior: python3 pycryptobot.py --market JASMYUSDT --live 0 --sim fast Expected behavior Result of the simulation

Desktop (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS
  • pycryptobot beta 6.2.0
  • python 3.9.5
  • pip 22.0.4

wtc0der avatar Mar 23 '22 12:03 wtc0der

Hello. I have the same problem. I fixed it by updating the matplotlib libraries

t00be avatar Apr 03 '22 12:04 t00be

With matplotlib 5.3.1 :

python3 pycryptobot.py --market HOTUSDT --sim fast

2022-04-04 09:23:38 INFO 2022-03-24 15:15:00 | HOTUSDT | 15m | 0.004786 | BUY 2022-04-04 09:23:38 INFO Resistance level of 0.004823 formed at 2022-03-24 10:45:00 2022-04-04 09:23:38 INFO Fibonacci Retracement Levels:{'ratio0_286': 0.0, 'ratio0': 0.0} 2022-04-04 09:24:08 CRITICAL Restarting application after exception: TypeError("cannot concatenate object of type '<class 'dict'>'; only Series and DataFrame objs are valid")

wtc0der avatar Apr 04 '22 07:04 wtc0der

I have the same issue, in my case it is happening when using Binance. I tried updating matplotlib but I already have the latest version.

Error: 2022-04-22 07:45:00 | BTCUSDT | 15m | Close: 40709.59 - Ready Chg: 0.00%/0.0% | ^ EMA12/26: 40650.7580 > 40649.3900 ^ | ^ MACD: 1.3680 > -12.0639 ^ | ^ OBV: 14640.0308 (4.1600%) ^ | ERI: buy | BUY | Last Action: SELL | DF HIGH: 42819.99 | DF LOW: 38795.19 | SWING: 10.37% | CURR Price is -4.93% away from DF HIGH | Range: 2022-04-19 05:00:00 <--> 2022-04-22 07:45:00 2022-04-22 07:45:00 | BTCUSDT | 15m | Close: 40709.59 | BUY Support level of 39751.0 formed at 2022-04-21 22:30:00 Fibonacci Retracement Levels:{'ratio1': 40290.8, 'ratio0_768': 40877.57} TypeError("cannot concatenate object of type '<class 'dict'>'; only Series and DataFrame objs are valid",)

OS: Ubuntu 20.04.4 LTS
pycryptobot  6.3.0
python 3.6.9
pip 21.1.2

fpartika avatar Apr 29 '22 21:04 fpartika

same issue here:

running: python3 pycryptobot.py --market BTC-USDT --sim fast-sample --simstartdate 2022-01-01 --simenddate 2022-04-01

leads to:

2022-01-14 20:00:00 | BTCUSDT | 1h | Close: 43100.94 - Ready Chg: 2.42%/0.5% | ^ EMA12/26: 42861.8433 > 42848.7487 ^ | ^ MACD: 13.0945 > -90.0369 ^ | BUY | Last Action: SELL | DF HIGH: 51853.1 | DF LOW: 40679.82 | SWING: 27.47% | CURR Price is -16.88% away from DF HIGH | Range: 2022-01-02 09:00:00 <--> 2022-01-14 20:00:00 2022-01-14 20:00:00 | BTCUSDT | 1h | Close: 43100.94 | BUY Resistance level of 44500.0 formed at 2022-01-13 14:00:00 Fibonacci Retracement Levels:{'ratio0_768': 42329.91, 'ratio0_618': 43396.78} TypeError("cannot concatenate object of type '<class 'dict'>'; only Series and DataFrame objs are valid")

juancastilla avatar May 02 '22 11:05 juancastilla

@juancastilla @fpartika @wtc0der If you are on the main branch, git pull for updates. Had this issue for two weeks. Updates added have resolved this TypeError.

MutugiD avatar May 06 '22 11:05 MutugiD

A new major version was released this year. Please upgrade to v7.0.34 or later and if you are still having a problem, raise an issue.

whittlem avatar Feb 05 '23 11:02 whittlem