Thread
#prefect-server
    g

    Gopinath Jaganmohan

    1 year ago
    Hi Team, I'm evaluating Prefect as data flow pipeline and started learning and trying out. My setup is Prefect Server, LocalAgent running inside a docker and creating task from jupyter Notebook and registering flow using S3 storage. I could all but when I run getting error "Failed to load and execute Flow's environment: AttributeError("'NoneType' object has no attribute 'setup'")"I know making some simple mistake, any help would be appreciated. Flow is simple hello world.
    @task def say_hello(): logger = prefect.context.get("logger") logger.info("Hello, Cloud!") with Flow("hello-flow",storage=storage) as flow: say_hello()

    Register the flow under the "tutorial" project

    clientP.register(flow,"learning")
    nicholas

    nicholas

    1 year ago
    Hi @Gopinath Jaganmohan - where is
    clientP
    coming from? From your code, it looks like you should be running
    flow.register(project_name="learning")
    g

    Gopinath Jaganmohan

    1 year ago
    Hi Nichola, Since my prefect server running remote, I couldn't find option to pass API url to flow, hence created client and used to register, registration works. here is my code for that.
    clientP = client.Client(api_server="API URL") storage = S3(bucket="bucket",client_options={"aws_access_key_id" : "awsaccesskeyidXXX", "aws_secret_access_key" : "awssecretaccesskey"})