FinRL
FinRL copied to clipboard
Error occurs in PaperTrading_Demo notbook while running on Colab
Describe the bug The bugs occur in Part 2 Train the agent while running train cell. The error message is ValueError: Too many values to unplack (expected 4) occurs in function explore_env. Here is the message:
ValueError Traceback (most recent call last)
3 frames
ValueError: too many values to unpack (expected 4)
The following is the process for how this error comes out. I think it is from step 3 where I did wrong.
There were some bugs occurred while running on Colab. Those were
- no attribute of
pd.Timedelta(str).delta
in /usr/local/lib/python3.10/site-packages/finrl/meta/data_processors/processor_alpaca.py -> Fixed by revising it topd.Timedelta(str).value
- ValueError: Parameter start received with timezone defined as 'UTC' although a Date must be timezone naive. -> Fixed by adding this line in 376
ts = ts.tz_localize(None)
to /usr/local/lib/python3.10/site-packages/exchange_calendars/calendar_helpers.py - TypeError: tuple indices must be integers or slices, not tuple -> Fixed by deleting
[np.newaxis, :]
in line 309agent.states = env.reset()[np.newaxis, :]
Not sure how to debug this error. Also, welcome any suggestions for these debugging approaches.