• Robin


    1 year ago
    Hey community, we are getting the weird and low informative error message
    {'type': ['Missing data for required field.']}
    as single log directly in the beginning of a flow that directly fails. What could be possible reasons and did you encounter the same? 😮 PS: the flow runs locally but throws this error on Prefect Cloud 🤔
    Michael Adkins
    5 replies
    Copy to Clipboard
  • Danny Vilela

    Danny Vilela

    1 year ago
    Hi Prefect! Quick question: PyCharm keeps telling me that the documentation-approved way of using the
    decorator is lacking a positional argument. For example:
    def add_one(x: int) -> int:
        return x + 1
    def add_two(x: int) -> int:
        return x + 2
    decorator over
    is how I’ve seen it in the docs, but it seems like the decorator for
    is how PyCharm likes it. Am I missing something?
    Danny Vilela
    Jim Crist-Harif
    6 replies
    Copy to Clipboard
  • a

    Alex Welch

    1 year ago
    Hello! I am running the hello-world flow and trying to get it running in the cloud. However when I do I get the following error
    {'type': ['Unsupported value: UniversalRun']}.
    It works locally. Here is my code:
    import prefect
    from prefect import task, Flow
    def say_hello():
        logger = prefect.context.get("logger")
        <http://logger.info|logger.info>("Hello, Cloud!")
    with Flow("hello-flow") as flow:
    Michael Adkins
    62 replies
    Copy to Clipboard
  • Felipe Montefuscolo

    Felipe Montefuscolo

    1 year ago
    Hi guys, where is the best place to make license questions?
    Felipe Montefuscolo
    16 replies
    Copy to Clipboard
  • m

    Matthew Blau

    1 year ago
    Hey all, I am running into a weird issue. We are trying to use Prefect to build a docker container that contains a module that depends on Pandas. We have been successfully able to build it and log "hello" to the UI. However, when we begin to use the module, we are unable to rebuild the docker container because it is looking for Pandas. The error it gives is: ModuleNotFoundError: No module named 'pandas' how can we resolve this?
    Michael Adkins
    13 replies
    Copy to Clipboard
  • i

    itay livni

    1 year ago
    Hi - I am trying to get some direction for the following error when a
    is run from within another flow. Unexpected error: ClientError('400 Client Error: Bad Request for url: https://api.prefect.io/graphql\nThis is likely caused by a poorly formatted GraphQL query or mutation but the response could not be parsed for more details') Traceback (most recent call last): File "/home/ilivni/miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 361, in _send_request response.raise_for_status() File "/home/ilivni/miniconda3/envs/py38lmap/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.prefect.io/graphql The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/engine/runner.py", line 48, in inner
        new_state = method(self, state, *args, **kwargs)
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/engine/task_runner.py", line 865, in get_task_run_state
        value = prefect.utilities.executors.run_task_with_timeout(
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/utilities/executors.py", line 299, in run_task_with_timeout
        return task.run(*args, **kwargs)  # type: ignore
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/utilities/tasks.py", line 454, in method
        return run_method(self, *args, **kwargs)
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/tasks/prefect/flow_run.py", line 177, in run
        flow_run_id = client.create_flow_run(
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 1094, in create_flow_run
        res = self.graphql(create_mutation, variables=dict(input=inputs))
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 298, in graphql
        result = <http://self.post|self.post>(
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 213, in post
        response = self._request(
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 445, in _request
        response = self._send_request(
      File "miniconda3/envs/py38lmap/lib/python3.8/site-packages/prefect/client/client.py", line 374, in _send_request
        raise ClientError(f"{exc}\n{graphql_msg}") from exc
    prefect.utilities.exceptions.ClientError: 400 Client Error: Bad Request for url: <https://api.prefect.io/graphql>
    This is likely caused by a poorly formatted GraphQL query or mutation but the response could not be parsed for more details
    Thanks in advance
    Chris White
    2 replies
    Copy to Clipboard
  • Rob Fowler

    Rob Fowler

    1 year ago
    If I have a task (for example winrm) that uploads and executes some scripts, what is the best way with prefect server to get them into the flow. In prefect core, I load the scripts from the local filesystem into a dictionary and pass this into the flow as a parameter when doing flow.run() For prefect server I'd like to use a cron job so I don't have a local script and the scripts must already exist. Store them in bitbucket? S3?
  • sark


    1 year ago
    hi guys, how do i define a user friendly logging task? without making the user define a separate task just to concatenate strings?
    def log(item):
    this works when you pass in the string output of an upstream task as the entirety of the input to the logging task
    but what if i want to do something like
    log("the output of the previous task was: " + output)
    here we have an issue because
    is not a task and so we will actually be logging something like
    the output of the previous task was: Task<blah blah>
    1 replies
    Copy to Clipboard
  • r


    1 year ago
    Hi, I want to limit my agent to running only a single flow / task. I thought I read about this functionality somewhere, but am unable to find it. Do you know where this is explained?
    6 replies
    Copy to Clipboard
  • v

    Vitaly Shulgin

    1 year ago
    Hi folks, we're using pyvirtualdisplay for one of the flow, running container in k8s, and got intermittent failure
    Failed to load and execute Flow's environment: StorageError("An error occurred while unpickling the flow:\n DisplayNameError('0.0')")
    2 replies
    Copy to Clipboard