question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

find_options_for_list_of_stocks_by_expiration_date fails to run sometimes

See original GitHub issue

Sometimes, for some stocks find_options_for_list_of_stocks_by_expiration_date function would fail. For example:

import robin_stocks as rs
rs.login('<email>', '<password>')
o = rs.find_options_for_list_of_stocks_by_expiration_date(['JPM'], expirationDate='2019-11-22', optionType='call')

Result:

$ python robin_stocks_test.py 
Found Additional pages.
Loading page 2 ...
Loading page 3 ...
Loading page 4 ...
Loading page 5 ...
Loading page 6 ...
401 Client Error: Unauthorized for url: https://api.robinhood.com/marketdata/options/35f92590-b047-4a7a-8256-30e470da4c48/
Traceback (most recent call last):
  File "robin_stocks_test.py", line 4, in <module>
    optionType='call')
  File "/home/garm/projects/trader/venv/lib/python3.6/site-packages/robin_stocks/options.py", line 263, in find_options_for_list_of_stocks_by_expiration_date
    item.update(marketData)
TypeError: 'NoneType' object is not iterable

It would work on one day, but not the other. Would work with other symbols just fine. I have robin-stocks==0.9.9.5, Python 3.6.8 right now.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jmfernandescommented, Nov 22, 2019

Thanks for bringing this to my attention. Will look into it.

0reactions
Monil1601commented, Aug 24, 2021

@stephen-nguyen do you still get this error when using the new find_options_by_expiration() function?

I’m still getting the error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why some runs feel harder and 3 useful tips you need to know
Why do some runs feel hard? You'll find 3 reasons why some runs feel hard and 3 top tips you can use to...
Read more >
Losing Running Fitness: A Scientific Look at How Much You'll ...
Learn exactly how much fitness and conditioning you'll lose from missing running due to injury or sickness.
Read more >
Finally: Why some days are harder to run | Well+Good
It's just the truth that some days are harder to run than others. Here, experts explain what factors influence how easy a run...
Read more >
Exertional rhabdomyolysis and acute renal failure in marathon ...
Strenuous exercise, including marathon running, can result in damage to skeletal muscle cells, a process known as exertional rhabdomyolysis.
Read more >
Why Do Some Runs Feel So Freaking Hard? - Greatist
“If you're not getting enough sleep, you won't recover properly or adapt to the hard workouts that you build up to,” Fitzgerald says....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found