Hello everyone, I'm facing an issue when trying to...
# ask-community
n
Hello everyone, I'm facing an issue when trying to run a Python script with Prefect and the
prefect-airbyte
package. Here's the code snippet:
Copy code
from prefect import flow
from prefect_airbyte.server import AirbyteServer
from prefect_airbyte.connections import AirbyteConnection
from prefect_airbyte.flows import run_connection_sync

server = AirbyteServer(server_host="localhost", server_port=8000)

connection = AirbyteConnection(
    airbyte_server=server,
    connection_id="...",
    status_updates=True,
)

@flow
def airbyte_syncs():
    sync_result = run_connection_sync(
        airbyte_connection=connection,
    )

    print(f'Number of Records Synced: {sync_result.records_synced}')
When I run this code, I encounter the following error:
Copy code
Traceback (most recent call last):
  File "zzz.py", line 2, in <module>
    from prefect_airbyte.server import AirbyteServer
ModuleNotFoundError: No module named 'prefect_airbyte.server'; 'prefect_airbyte' is not a package
I've already installed the
prefect-airbyte
package using
pip
. Does anyone know why this error is occurring or how to resolve it? Thank you!