I'm trying to upgrade from prefect 2.x to 3.0.11 a...
# ask-marvin
a
I'm trying to upgrade from prefect 2.x to 3.0.11 and I'm running into an error when attempting to create a flow run from a deployment id.
Copy code
await client.create_flow_run_from_deployment(deployment_id=deployment.id)
It is raising this error
Copy code
pydantic.errors.PydanticUserError: `StateCreate` is not fully defined; you should define all referenced types, then call `StateCreate.model_rebuild()`.
I appear to be able to replicate the issue by running the following
Copy code
import prefect.states

state = prefect.states.Scheduled()
state.to_state_create()
Is this an existing issue or am I calling the method incorrectly for Prefect 3.0?