alxthm/rld-project

Pandas Error in eval.py

Closed this issue · 1 comments

Bug found with @Mattcrmx


Running python3 eval.py returns the following error:

Loading environment football failed: No module named 'gfootball'
Traceback (most recent call last):
  File "eval.py", line 210, in <module>
    main()
  File "eval.py", line 200, in main
    df, df_all = eval_agent_against_baselines(my_agent, opponents, num_episodes=10)
  File "eval.py", line 76, in eval_agent_against_baselines
    df = pd.DataFrame(
  File "/Users/paulgarnier/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pandas/core/frame.py", line 411, in __init__
    mgr = init_dict(data, index, columns, dtype=dtype)
  File "/Users/paulgarnier/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pandas/core/internals/construction.py", line 242, in init_dict
    val = construct_1d_arraylike_from_scalar(np.nan, len(index), nan_dtype)
  File "/Users/paulgarnier/.pyenv/versions/3.8.1/lib/python3.8/site-packages/pandas/core/dtypes/cast.py", line 1221, in construct_1d_arraylike_from_scalar
    dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'

using the following version of pandas:

Name: pandas
Version: 0.25.3

and python 3.8.1

Try updating panda, version 1.2.2 for instance is working :-)