BUG: while reading stata, if the path is got from input() #17523
- [x] closes #17523
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
