I have a class that calls upon another class to use it's function
main.py
--------------------
class MyClass():
def main(self, arg):
from lib.otherclass import OtherClass
otherClass = OtherClass()
result = otherClass.prepare.importImage(image)
myClass = MyClass()
final = myClass(image)
I get this error
importImage() takes 1 positional argument but 2 were given
This is what the other class looks like:
class OtherClass():
def __init__(self):
self.prepare = Prepare()
class Prepare():
def importImage(image):
blah blah blah
How do I fix this?