https://prefect.io logo
r

Rohit Motiani

12/28/2022, 5:20 PM
Hello, I am trying out prefect for the first time and am running it on my local machine. The prefect orion start was running fine, until I created a flow that does a parallel flow execution. Will appreciate any guidance on how to resolve the error.
k

Kalise Richmond

12/28/2022, 5:44 PM
Hi @Rohit Motiani, I just tested a sample of your code and the structure looks fine and ran for me. I replaced the generateOutputFile with a print statement so maybe there is an error with that function.
Copy code
from prefect import task, flow
from prefect_dask.task_runners import DaskTaskRunner


@task 
def run_product():
    print('hello')

@task 
def run_field():
    print('hello')

@flow(task_runner=DaskTaskRunner())
def main_flow():
    result = run_product.submit()
    result = run_field.submit()

if __name__ == "__main__":
    main_flow()
r

Rohit Motiani

12/28/2022, 7:26 PM
Hi @Kalise Richmond. Thanks for the response. This code was working before, and I was able to see the flow on the API. However, after I ran the code, the "prefect orion start" displayed the error message posted before. The code is also unable to communicate with the API. After running with the print statement, I still get the same error (Sorry I should have posted this earlier, when I ran my original code.)
@Matt Conger, this is the error we discussed during the demo, thanks
@Emil Christensen, error that we discussed. Thanks
a

Anna Geller

01/04/2023, 10:31 AM
can you share your
prefect version
and
prefect config view
? did you start Orion? you can do that using
prefect orion start
if this doesn't help, could be an issue with the network i.e. Dask runner can't reach orion
to troubleshoot, you can remove dask runner for now even simpler, start with a hello world flow and see if that works first
e

Emil Christensen

01/04/2023, 4:55 PM
@Rohit Motiani to add to what @Anna Geller said… Can you see what
prefect version
returns in your IDE and in your terminal where you’re spinning up Orion?
r

Rohit Motiani

01/05/2023, 3:57 PM
@Emil Christensen, here is the screen shot:
@Anna Geller and @Emil Christensen, this is what I get when I run prefect orion start:
Without even running my code
k

Kalise Richmond

01/05/2023, 10:43 PM
Hi @Rohit Motiani, it's worth updating your Prefect version on 2.7.6 which was released yesterday. There was a critical bug on 2.7.4 with sqlite. I'm not on Windows but based on the error your seeing, it could be related to this.
r

Rohit Motiani

01/06/2023, 11:24 PM
@Kalise Richmond, I get the same error after installing the latest version:
@Kalise Richmond is there a way to completely uninstall Prefect and reinstall. I would like to try that and see if that resolves the error upon running prefect orion start
k

Kalise Richmond

01/06/2023, 11:31 PM
you could try resetting the database or pip uninstall
r

Rohit Motiani

01/07/2023, 5:05 AM
@Anna Geller I removed dask runner, but no luck. Did a database reset, uninstalled and reinstalled prefect, still the same issue / error message running prefect orion start. Highlighted in the prefect config view, which I did not share earlier.
e

Emil Christensen

01/09/2023, 3:00 PM
@Rohit Motiani As per Kalise’s message, it looks like this is a Windows compatibility issue that has to do with asyncio. I’m going to open up an issue and will link it here.
@Rohit Motiani Here’s the issue. If you wouldn’t mind, could you copy/paste the
prefect version
text and the error text here?
r

Rohit Motiani

01/10/2023, 5:38 PM
Hi @Emil Christensen. I was able to get past and reproduce the issue. To get past the issue, I had to do the following. 1. Delete the file in C:\Users\<user_name>\AppData\Roaming\Python. 2. Comment the code: @flow #(task_runner=DaskTaskRunner()). To reproduce the issue, all I have to do is uncomment the DaskTaskRunner. I agree its an issue running the DaskTaskRunner on Windows.
e

Emil Christensen

01/20/2023, 9:47 PM
Hi @Rohit Motiani 👋 Hope you’re doing well. Just wanted to let you know that we released a fix to your bug in version 2.7.9. Let us know if you’re able to upgrade and resolve the issue. Thank you!