you need to create environmental variables
In user variables give "python as variable name"
In value "give the path of where the python folder was located"
In system variables select the variable "path" and add the same path where python was located
NOTES(::usually python located in your c: partition
This error is shown when there is no module or fuction of that type
in the library you ask for in your code
# one might have tried to access something that doesn't exist
# inside the object
sample = [1, 2]
sample.append(3)
sample.push(3)
# This raises AttributeError saying
# push doesn't exist inside an object of list
See if their any spell mistake or,
Checkout that is there any function defined or not which you have used for
your object in that object class in which this error showing
class Human():
def hands():
pass
def eyes():
pass
h1 = Human()
h1.wings()
#it will give error because you have not any attributes like wings. Here only two
#attributes hands and eyes.
Reason : object not finding attribute named like wings
class Obj:
def __init__(self):
self.attr = 1
object = Obj()
#a valid attribute call for this object would be:
object.attr # = 1
#The error "python object has no attribute" comes from calling an attribute that
#does not exist. For example:
object.not_an_attribute
#If you get this error double check to make sure you spelled the attribute call
#correctly, or if that object has that attribute in the first place