Raise OptionError instead of KeyError in __getattr__. Fixes  #19789.
- [x] closes #19789
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry
