Forums

Error: 'NoneType' object has no attribute 'text'

I am getting this error only when I run the code on Python Anywhere. I do have a paid account. The code works perfectly when running locally.

You need to inspect the state of your code at the line where it's failing -- apparently it has a different state that you're expecting, for some reason (instead of an object with text it's getting None).

When I run the code on my Terminal on Mac, it works fine, only on Python Anywhere does it have this error.

So there's probably a difference between those environments. To debug it some more data is needed -- for example why the code gets None instead of some expected object. I'd recommend adding some logging to different stages of your code, to determine where it starts to behave differently.

Thanks, I figured it out. The site was blocking PA. I found a proxy to use and it is working now.

Great, thanks for letting us know!