PureDevOps Community

Python: 'NoneType' object has no attribute 'something'?

I am getting an error message that says

AttributeError: 'NoneType' object has no attribute 'something'

How can I understand this message?

What general scenarios might cause such an AttributeError, and how can I identify the problem?

NoneType means that instead of an instance of whatever Class or Object you think you’re working with, you’ve actually got None . That usually means that an assignment or function call up above failed or returned an unexpected result