I just tested this same code with the Python 3 REPL locally, using my own consumer key and secret for the app that has access to the API, and I’m not seeing the same error. I can print(tweets) at the end of this code and get back the Tweet objects.
Do you have any other environment variables set in your shell, or are you only setting the values in the code?
Do you see these messages when the code is executed?
cannot read file
Error parsing YAML file; searching for valid environment variables
Grabbing bearer token from OAUTH
If your auth is setup correctly, I’d expect this to be output and to succeed. Otherwise, you’d likely see an error about your bearer token.