Hey guys, I am facing an issue while trying to use...
# prefect-community
a
Hey guys, I am facing an issue while trying to use a
Dask executor
along with prefect ui+server. My prefect ui+server and dask are all on docker containers via a docker-compose file, belonging to the same network. I start up my agent, which is a local agent on a docker container and use
flow.register()
to register my flow. When I try to set the executor in flow.environment , I get an error. Not sure how to proceed here. This is how I am setting the dask executor:
Copy code
client = Client("scheduler:8786")
        dask_executor = DaskExecutor(address=client.scheduler.address)
        flow.environment = LocalEnvironment(executor=dask_executor)
        flow.register()
The error that I get is :
Copy code
flow.environment = LocalEnvironment(executor=dask_executor)
TypeError: __init__() got an unexpected keyword argument 'executor'
I am also getting a warning:
Copy code
warnings.warn(version_module.VersionMismatchWarning(msg[0]["warning"]))
Point to note, I can manage to execute the flows from the UI without dask.
j
Hi @Ankit what perfect version are you using in the place you call register?
a
0.11.1
j
That kwarg was added in version 0.12.1 (and prefect is currently on 0.12.4) 🙂 so to use it you should update your version
😀 1
a
Hey @josh thanks for the quick reply. Updating the version fixed everything, should have tried it earlier. Thanks a lot!