Michael Shoemaker
10/05/2022, 2:58 PMImportError while loading conftest '/home/gary/prefect/tests/conftest.py'.
tests/conftest.py:32: in <module>
import prefect
src/prefect/__init__.py:23: in <module>
from prefect.flows import flow, Flow
src/prefect/flows.py:36: in <module>
from prefect.context import PrefectObjectRegistry, registry_from_script
src/prefect/context.py:34: in <module>
from prefect.client import OrionClient
src/prefect/client.py:55: in <module>
from prefect.orion.api.server import ORION_API_VERSION, create_app
src/prefect/orion/api/__init__.py:1: in <module>
from . import (
src/prefect/orion/api/block_documents.py:19: in <module>
from prefect.orion import models, schemas
src/prefect/orion/models/__init__.py:1: in <module>
from . import (
src/prefect/orion/models/block_schemas.py:12: in <module>
from prefect.blocks.core import Block
src/prefect/blocks/__init__.py:3: in <module>
import prefect.blocks.notifications
src/prefect/blocks/notifications.py:26: in <module>
class SlackWebhook(NotificationBlock):
pydantic/main.py:283: in pydantic.main.ModelMetaclass.__new__
???
../anaconda3/lib/python3.9/abc.py:106: in __new__
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
src/prefect/utilities/dispatch.py:99: in _register_subclass_of_base_type
register_type(cls)
src/prefect/utilities/dispatch.py:154: in register_type
key = get_dispatch_key(cls)
src/prefect/utilities/dispatch.py:76: in get_dispatch_key
dispatch_key = dispatch_key()
src/prefect/blocks/core.py:127: in __dispatch_key__
return block_schema_to_key(cls._to_block_schema())
src/prefect/blocks/core.py:263: in _to_block_schema
return BlockSchema(
pydantic/main.py:340: in pydantic.main.BaseModel.__init__
???
pydantic/main.py:1076: in pydantic.main.validate_model
???
pydantic/fields.py:884: in pydantic.fields.ModelField.validate
???
pydantic/fields.py:1101: in pydantic.fields.ModelField._validate_singleton
???
pydantic/fields.py:1148: in pydantic.fields.ModelField._apply_validators
???
pydantic/class_validators.py:318: in pydantic.class_validators._generic_validator_basic.lambda13
???
pydantic/main.py:690: in pydantic.main.BaseModel.validate
???
E DeprecationWarning: `copy_on_model_validation` should be a string: 'deep', 'shallow' or 'none'
Kunal Tyagi
10/05/2022, 3:21 PMJason Bertman
10/05/2022, 4:54 PMKyle D
10/05/2022, 5:15 PMcreate_flow_run()
in prefect 2? I’m trying to see how the flow
parameter should be setupNathan R
10/05/2022, 6:42 PMNick McGoye
10/05/2022, 6:57 PMNace Plesko
10/05/2022, 7:37 PMShellTask
which is written in Typescript. As part of the typescript script we call python script. The prefect timeout works if it's reached while typescript is executing, but the timeout doesn't work if the process is stuck inside the python script.
Has anyone ran into the same issue before in the past? Any advice is appreciated, thank you in advance!Norman
10/05/2022, 8:12 PMJarvis Stubblefield
10/05/2022, 8:51 PMprefect agent
to execute within my Django environment (using Django ORM in the flow). I finally got the deployment created by adding my project to the sys path before running the Django setup. That works for running the flow manually, but now I’m getting another error when the Agent tries to run the flow. Full error in the thread message. So my idea at this point is to create a Django Management command (which executes in the Django environment) to run the agent through Python code. I have an example of doing this in Prefect v1, but I’m using Prefect v2 and haven’t see where this is clearly documented. LocalAgent
no longer seems to exist in Prefect v2 to run an agent through code. Any ideas of other ways to run this or how to run the agent from within Python would be super helpful and wholly appreciated!Adam
10/05/2022, 9:51 PMEmon Li
10/06/2022, 12:22 AMPaco Ibañez
10/06/2022, 2:45 AMVadym Dytyniak
10/06/2022, 7:50 AMprefect.context.scheduled_start_time
. Is it any alternative in Prefect 2? Thanks.Andreas Tsangarides
10/06/2022, 8:35 AMPekka
10/06/2022, 10:37 AMImportError: dbt-core needs to be installed to use this task; run `pip install "prefect-dbt[cli]"
when I definitely have prefect-dbt[cli]
installed both for the system and for the project.
The error happens when running
prefect_dbt.cli.commands.trigger_dbt_cli_command("dbt debug")
-- does this have to do with missing trigger_kwargs
-- not the package missing?
SOLVED: INSTALL PREFECT-DBT[CLI] AS ROOT (the subprocesses don't have the same PATH variable so the which
command doesn't find them)Zach Schuster
10/06/2022, 2:11 PMrectalogic
10/06/2022, 3:42 PMDavid Elliott
10/06/2022, 4:29 PMlogger
doesn’t seem to output logs either to terminal or to the cloud UI when using the DaskTaskRunner()
- I’m calling get_run_logger()
within the task - code attached in 🧵 . Any ideas / am I missing something?
(works fine with sequential / concurrent task runners, just not the Dask one)Nick DeCraene
10/06/2022, 4:47 PMNone
instead of what is hinted at in the method. Does anyone know of a work-around besides ignoring the errors?YZ
10/06/2022, 5:38 PMstate_handler(task, old_state, new_state)
Is there a way to access the original input parameters for the task
? For example, my original task is as below, and I would like to access config
in the state_handler
def state_handler(task, old_state, new_state):
# Question: how can I access the `config` variable I originally passed into `task`?
@task(state_handlers=[state_handler])
def my_task(config: Any):
if config.is_prod:
# do something
Daniel Burkhardt
10/06/2022, 5:59 PMJason Bertman
10/06/2022, 6:40 PM@flow(
task_runner=RayTaskRunner(
address="<ray://ray-cluster-kuberay-head-svc:10001>"
),
)
def main(...):
...
if __name__ == "__main__": # If this flow is called directly, don't use the address
main(..., task_runner=RayTaskRunner)
V
10/06/2022, 8:01 PMZackary Wixom
10/06/2022, 9:49 PMZac Hooper
10/07/2022, 4:47 AMRRuleSchedule(
rrule="DTSTART:20221007T120000Z\nRRULE:FREQ=WEEKLY;UNTIL=20240330T120000Z\nEXDATE:20221225T120000Z\nEXDATE:20221226T120000Z"
)
Thomas Opsomer
10/07/2022, 8:12 AMFailed to load and execute flow run: FlowStorageError('An error occurred while unpickling the flow:\n JSONDecodeError("Expecting \',\' delimiter: line 1141 column 82 (char 62124)")')
(We're using GCS for storage)Thomas Fredriksen
10/07/2022, 8:37 AMClovis
10/07/2022, 8:58 AMGCloudRun
. Great 🎉 !
However, after connecting to my prefect cloud environment no new block available and I could not find the way to find the Cloud UI current version. So my question was how can I retrieve the version from the cloud , and is there a way to update / rollback it manually ?Kelvin DeCosta
10/07/2022, 9:02 AMAnna Geller
10/07/2022, 11:46 AMAnna Geller
10/07/2022, 11:46 AM