Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrays must all be same length #3

Open
Nick8197 opened this issue Jan 11, 2019 · 5 comments
Open

Arrays must all be same length #3

Nick8197 opened this issue Jan 11, 2019 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@Nick8197
Copy link

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
Copy link
Author

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
Copy link
Owner

@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
Copy link
Author

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
Copy link
Author

@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
Copy link
Author

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?

@anthonykrivonos anthonykrivonos added the help wanted Extra attention is needed label Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants