Hi everyone, it is my first time using Prefect and...
# ask-community
j
Hi everyone, it is my first time using Prefect and I'm not sure why the following code does not work. Basically I'm trying to set the @flow decorator to a method of a class:
Copy code
from prefect import flow

class myClass:

    @flow(log_prints=True)
    def start(self):
        print("Start class")

if __name__ == "__main__":

    myclass = myClass()
    myclass.start()
This is the error that I get:
Copy code
Error binding parameters for function 'start': missing a required argument: 'self'.
Thanks for your help!
r
flows/tasks are meant to be stateless really so you wont be able to do this
j
I understand, thanks 🙂