8000 Attribute Error · Issue #14 · 2018kguo/RobinhoodBot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Attribute Error #14

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

Open
currfromnexgen opened this issue Jun 30, 2020 · 1 comment
Open

Attribute Error #14

currfromnexgen opened this issue Jun 30, 2020 · 1 comment

Comments

@currfromnexgen
Copy link

I have the latest version of robin_stocks; I'm not sure if that's the foremost issue, who knows.

I was actually looking at the list of functions for the latest version of robin_stocks; I realized that the function "get_historicals" doesn't exist. After replacing the initial function and amending it with "get_stock_historicals," an error popped up: "TypeError: 'NoneType' object is not subscriptable"

Are/is there any remedy for this?

Here's the full error:

  File "c:/Users/mouse/OneDrive/Desktop/RobinhoodBot/robinhoodbot/main.py", line 271, in <module>
    scan_stocks()
  File "c:/Users/mouse/OneDrive/Desktop/RobinhoodBot/robinhoodbot/main.py", line 251, in scan_stocks
    cross = golden_cross(symbol, n1=50, n2=200, days=30, direction="below")
  File "c:/Users/mouse/OneDrive/Desktop/RobinhoodBot/robinhoodbot/main.py", line 168, in golden_cross
    history = r.get_historicals(stockTicker,span='year',bounds='regular')
AttributeError: module 'robin_stocks' has no attribute 'get_historicals'
@2018kguo
Copy link
Owner
2018kguo commented Jul 7, 2020

I just tried upgrading to the latest version of robin_stocks myself and indeed it doesn't work on the latest version. The error is due to the API request to Robinhood being broken somehow in the newer version of robin_stocks. This is what I see when I try running get_stock_historicals:

400 Client Error: Bad Request for url: https://api.robinhood.com/quotes/historicals/?symbols=ATVI&interval=hour&span=year&bounds=regular

It still works fine on the version I was using, 1.0.0.7
I'll write up a ticket on robin_stocks and make a note of not using the latest version for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0