Unsupported operand type(s) for /: 'str' and 'float'
NCryptos opened this issue · 5 comments
Hi,
I cloned the repo, installed the required packages in a new conda environment and runned run.py without any changes to the code.
Getting an error in data_processing line 18; "unsupported operand type(s) for /: 'str' and 'float'"
python version 3.6.9
conda 4.7.11
windows 10 professional
+1; I'm having the same issue. Installed the required packages via pip. It might also be worth noting that I get a dtype warning on line 11: "DtypeWarning: Columns (2,3,4,5,6) have mixed types. Specify dtype option on import or set low_memory=False."
pip v19.2.3
python v3.7.3
Windows 10 Home
Same, please help :-)
If you re-run the script the base.batch_run()
calls will append to existing csv's, thereby adding (strings of) headers in the middle of your dataset.
Delete the files in AIAlpha-master\sample_data\processed_data\autoencoder_data and try again.
Edit: Delete the CSVs in AIAlpha-master/sample_data/processed_data/price_bars/volume_bars
If you re-run the script the
base.batch_run()
calls will append to existing csv's, thereby adding (strings of) headers in the middle of your dataset.
Delete the files in AIAlpha-master\sample_data\processed_data\autoencoder_data and try again.
the same error still happens ~
sad!
If you re-run the script the
base.batch_run()
calls will append to existing csv's, thereby adding (strings of) headers in the middle of your dataset.
Delete the files in AIAlpha-master\sample_data\processed_data\autoencoder_data and try again.the same error still happens ~
sad!
Delete the data in AIAlpha-master/sample_data/processed_data/price_bars/volume_bars . That should do the trick, otherwise go through the steps below.
Do you also get this warning: DtypeWarning: Columns (2,3,4,5,6) have mixed types. Specify dtype option on import or set low_memory=False.
(or something similar). That would indicate that there are headers or other nonsense somewhere in the csv.
Do you have Jupyter-Notebooks or Spyder? I.e. data exploring tools? Try to open the CSV in a DataFrame to see if there are inconsistencies. E.g. forcing the values to floats by using .astype()
functionality from Pandas.