I keep getting an error that says
AttributeError: 'NoneType' object has no attribute 'something'
The code I have is too long to post here. What general scenarios would cause this AttributeError
, what is NoneType
supposed to mean and how can I narrow down what's going on?
print
functions (or statements depending on the version) to reveal the actual values that variables actually have in the code that's having this problem.yourobject = somthing_that_is_None
before callingyourobject.babyruth
. Maybesomething_that_is_None
is a function that returnNone
. Without the code is impossible to know.None
.