I keep getting an error that says
AttributeError: \'NoneType\' object has no attribute \'something\'
It means the object you are trying to access None
. None
is a Null
variable in python.
This type of error is occure de to your code is something like this.
x1 = None
print(x1.something)
#or
x1 = None
x1.someother = "Hellow world"
#or
x1 = None
x1.some_func()
# you can avoid some of these error by adding this kind of check
if(x1 is not None):
... Do something here
else:
print("X1 variable is Null or None")