Hi, I am getting this error importing fivetran's t...
# ask-community
m
Hi, I am getting this error importing fivetran's tasks:
Copy code
from prefect_fivetran.connectors import fivetran_sync_flow
ImportError: cannot import name 'fivetran_sync_flow' from 'prefect_fivetran.connectors' (/usr/local/lib/python3.9/site-packages/prefect_fivetran/connectors.py)
n
I don't believe there's anything called
fivetran_sync_flow
defined in that collection, I think you want this one
m
n
ahh that appears to be a typo, I'll open an issue
m
I'm confused- even in that Github repo I see
from prefect_fivetran.connectors import fivetran_sync_flow
n
Sorry about the confusion - we don't own this repo, it's managed by Fivetran so for the moment we've opened a PR with the documentation fixes and are awaiting their review that PR will fix the reference to the non-existent
fivetran_sync_flow
in: • the first readme / PyPI example • here in connectors.py
you can check out the updated docs on this branch
m
thanks!
I
I'm not getting this error, related to that async wait question I had the other day:
Copy code
RuntimeError: A 'sync_compatible' method was called from a context that was previously async but is now sync. The sync call must be changed to run in a worker thread to support sending the coroutine for 'load' to the main thread.
any idea how to fix this? My task looks like:
Copy code
@task
def webevent_sync(fivetran_credentials):
    webevents_secret = Secret.load("webevents-connector_id")
    webevents_sync = trigger_fivetran_connector_sync_and_wait_for_completion(
        fivetran_credentials=fivetran_credentials,
        connector_id=webevents_secret.get(),
        schedule_type="manual",
        poll_status_every_n_seconds=30,
    )
n
what does
prefect version
show?
m
`
Copy code
Version:             2.3.2
API version:         0.8.0
Python version:      3.9.13
Git commit:          6e931ee9
Built:               Tue, Sep 6, 2022 12:36 PM
OS/Arch:             darwin/x86_64
Profile:             madisonschott
Server type:         cloud
n
hmm can you upgrade via
pip install -U prefect
? This issue should be handled in recent versions
m
Ok that seemed to get rid of that error- now I'm seeing
Copy code
prefect.exceptions.ScriptError: Script at 'data_pipeline_2.0_prod.py' encountered an exception
An exception occurred.
sys:1: RuntimeWarning: coroutine 'Block.load' was never awaited
RuntimeWarning: Enable tracemalloc to get the object allocation traceback