fraibacas / prefect-orion Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Awesome repo! Im trying to set it up on a WSL2 Ubuntu 20 machine (with docker desktop).
Things seem to run, however when I load the orion ui, I get the following message:
I get this error even though I updated the /etc/hosts and I can curl the prefect-server address.
Not sure what the issue could be, any help would be more than welcome!
The flows were running ok till last week. Suddenly I am getting the below error.
`Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "", line 839, in exec_module
File "", line 975, in get_code
File "", line 1032, in get_data
FileNotFoundError: [Errno 2] No such file or directory: 'test_flow.py'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 257, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.8/site-packages/prefect/client/orion.py", line 82, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 70, in load_flow_from_flow_run
flow = await run_sync_in_worker_thread(import_object, str(import_path))
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 57, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 193, in import_object
module = load_script_as_module(script_path)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 156, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at 'test_flow.py' encountered an exception`
Hi,
I'm trying perfect out and found your repository. I was able to start everything and deploy following the README.
But during the deployment execution, I can see that the agent triggers things correctly, without issues.
20:17:06.294 | DEBUG | prefect.agent - Checking for flow runs...
20:17:06.308 | INFO | prefect.agent - Submitting flow run '837896b9-42a7-4a51-a539-bf685acc38e9'
20:17:06.433 | INFO | prefect.infrastructure.docker-container - Creating Docker container 'pi97-meduseld-v'...
20:17:06.974 | INFO | prefect.agent - Completed submission of flow run '837896b9-42a7-4a51-a539-bf685acc38e9'
20:17:06.987 | INFO | prefect.infrastructure.docker-container - Docker container 'pi97-meduseld-v' has status 'running'
20:17:09.299 | INFO | prefect.infrastructure.docker-container - Docker container 'pi97-meduseld-v' has status 'exited'
But looking at the log from the run it outputs
Loading flow for deployment 'docker-example'...
Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 839, in exec_module
File "<frozen importlib._bootstrap_external>", line 975, in get_code
File "<frozen importlib._bootstrap_external>", line 1032, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/flows/test_flow/test_flow.py'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 254, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 104, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 73, in load_flow_from_flow_run
flow = await run_sync_in_worker_thread(import_object, str(import_path))
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 56, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 193, in import_object
module = load_script_as_module(script_path)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 156, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at '/flows/test_flow/test_flow.py' encountered an exception
Looking at the docker that the agent created I can see more information
20:17:08.529 | DEBUG | prefect.client - Connecting to API at http://prefect-server:4200/api/
20:17:08.848 | DEBUG | Flow run 'pi97-meduseld-v' - Loading flow for deployment 'docker-example'...
20:17:08.850 | ERROR | Flow run 'pi97-meduseld-v' - Flow could not be retrieved from deployment.
Traceback (most recent call last):
File "<frozen importlib._bootstrap_external>", line 839, in exec_module
File "<frozen importlib._bootstrap_external>", line 975, in get_code
File "<frozen importlib._bootstrap_external>", line 1032, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/flows/test_flow/test_flow.py'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/prefect/engine.py", line 254, in retrieve_flow_then_begin_flow_run
flow = await load_flow_from_flow_run(flow_run, client=client)
File "/usr/local/lib/python3.8/site-packages/prefect/client.py", line 104, in with_injected_client
return await fn(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/prefect/deployments.py", line 73, in load_flow_from_flow_run
flow = await run_sync_in_worker_thread(import_object, str(import_path))
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/asyncutils.py", line 56, in run_sync_in_worker_thread
return await anyio.to_thread.run_sync(call, cancellable=True)
File "/usr/local/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 193, in import_object
module = load_script_as_module(script_path)
File "/usr/local/lib/python3.8/site-packages/prefect/utilities/importtools.py", line 156, in load_script_as_module
raise ScriptError(user_exc=exc, path=path) from exc
prefect.exceptions.ScriptError: Script at '/flows/test_flow/test_flow.py' encountered an exception
20:17:08.880 | DEBUG | prefect.client - Connecting to API at http://prefect-server:4200/api/
Should I open a bug report on Prefect?
Seems like this was fixed on PrefectHQ/prefect#6554
I think there is a step missing between this setup instruction below. I don't know what "create a flow run " means in this context. Were we supposed to open a webpage, if so which one.
* Deploy test flow and deployment
```
make register-test-flow
```
A flow named `my-docker-flow` and a `my-docker-flow/docker-example` deployment should have been created
* Create a flow run from the `Deployments` screen by selecting the deployment and clicking on `Run`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.