anthonykrivonos / Quantico

🌿 (Help wanted) Live quant trading engine for Robinhood in Python 3, now with backtesting.
MIT License
17 stars 10 forks source link

Arrays must all be same length #3

Open Nick8197 opened 5 years ago

Nick8197 commented 5 years ago

Hello I am getting this error after running driver.py with my login

Traceback (most recent call last): File "driver/run.py", line 47, in my_port = query.user_portfolio() File "src/query.py", line 157, in user_portfolio return Portfolio(self, quotes, 'User Portfolio') File "src/models/portfolio.py", line 56, in init self.update_assets() File "src/models/portfolio.py", line 78, in update_assets market_data = self.get_market_data_tuple() File "src/models/portfolio.py", line 276, in get_market_data_tuple df = pd.DataFrame(historicals) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 348, in init mgr = self._init_dict(data, index, columns, dtype=dtype) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 459, in _init_dict return _arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 7356, in _arrays_to_mgr index = extract_index(arrays) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/frame.py", line 7402, in extract_index raise ValueError('arrays must all be same length') ValueError: arrays must all be same length

Nick8197 commented 5 years ago

My fault I needed to update python to 3.7

I am getting this error now though Any ideas?

Traceback (most recent call last): File "driver/run.py", line 47, in my_port = query.user_portfolio() File "src/query.py", line 152, in user_portfolio user_portfolio = self.trader.stock_portfolio() AttributeError: 'Robinhood' object has no attribute 'stock_portfolio'

anthonykrivonos commented 5 years ago

@Nick8197 Thanks for opening this issue. Are you using a version of the Robinhood API that's unprovided with the repo? In this case, since stock_portfolio is a method I added to the API, you should export the Robinhood folder from here into ext_modules/Robinhood.

Nick8197 commented 5 years ago

Hello I started getting the array errors again. Do you happen to know if this repo will work with python 3.6 also by the way?

Nick8197 commented 5 years ago

@anthonykrivonos Thanks I used that Robinhood I’m getting the array errors. I am currently holding a stock from before installation can that be causing array issues?

Nick8197 commented 5 years ago

I get the same array error no matter what I do reinstalled on fresh OS Mac OS X, Ubuntu, mint all python versions. Any ideas?