https://prefect.io logo
a

Ayah Safeen

02/27/2022, 6:41 AM
Hello All.. I was checking the new open-source engine "Orion", but when I run the code I get the following error on the import statement
from prefect import flow
cannot import name 'ThreadedChildWatcher' from 'asyncio'
The code :
Copy code
from prefect import flow
@flow
def common_flow(config: dict):
    print("I am a subgraph that shows up in lots of places!")
    intermediate_result = 42
    return intermediate_result

@flow
def main_flow():

    data = common_flow(config={})

# run the flow
flow_state = main_flow()
discourse 1
a

Anna Geller

02/27/2022, 4:27 PM
What Python version do you use? What’s your Orion version?
Copy code
prefect --version
Can you import this function without errors?
Copy code
from asyncio import get_running_loop
Often reinstalling Orion in a new virtual environment and resetting the DB helps in similar cases - you can: • delete the database file
~/.prefect/orion.db
. • reset the database with the CLI command
prefect orion database reset
• and then restart orion with
prefect orion start
a

Ayah Safeen

03/01/2022, 6:45 AM
• python version Python 3.10.1 •
from asyncio import get_running_loop
is running as well without any errors • there is no orion.db file in venv\Lib\site-packages\prefect directory • Finally I get the same error mentioned in the previous message when I run those commands
prefect orion database reset
prefect orion start
a

Anna Geller

03/01/2022, 10:39 AM
I believe the DB file is always located in ~/.prefect/orion.db regardless of whether you install Orion globally or in a virtual environment
a

Ayah Safeen

03/02/2022, 1:39 PM
Hi, I installed it on ubuntu env instead of windows, and worked as well
👍 1
3 Views