Hello All.. I was checking the new open-source eng...
# ask-community
a
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
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
• 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
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
Hi, I installed it on ubuntu env instead of windows, and worked as well
👍 1