• t

    Trevor Kramer

    1 year ago
    I frequently can't load cloud.prefect.io. I get blinking dots forever, Doing a hard reload doesn't help. Has anyone else run into this?
    t
    nicholas
    +3
    9 replies
    Copy to Clipboard
  • Saksham Dixit

    Saksham Dixit

    1 year ago
    Hello everyone, I am trying to write a state handler for my flow
  • Saksham Dixit

    Saksham Dixit

    1 year ago
    when it is called the new_state's 'result' attribute is an empty dictionary
  • Saksham Dixit

    Saksham Dixit

    1 year ago
    Its should ideally have all the tasks and whether the failed or succeeded
    Saksham Dixit
    Michael Adkins
    9 replies
    Copy to Clipboard
  • Saksham Dixit

    Saksham Dixit

    1 year ago
    Can you guys suggested why the result attribute would be an empty dictionary?
  • Matthew Millendorf

    Matthew Millendorf

    1 year ago
    Hello, I am wondering if anyone has an example of getting a flow’s ID using the flow name and project name to execute a pre-registered flow from within a web loop? I’m not entirely sure on the best approach and how to do this: Option 1: if there is a route that I can make a GET request too, how would I find that? (been searching the repo but no luck yet) Option 2: I would write this as a graphql query. How would I know what to write? Thanks - any help is much appreciated!
    Matthew Millendorf
    Kevin Kho
    +1
    47 replies
    Copy to Clipboard
  • b

    Belal Aboabdo

    1 year ago
    Hi All My CI process is failing health checks when building my flow with
    prefect build -p
    with the following error. Anyone experience this issue?
    Beginning health checks...
    System Version check: OK
    Traceback (most recent call last):
      File "/opt/prefect/healthcheck.py", line 150, in <module>
        flows = import_flow_from_script_check(flow_file_paths)
      File "/opt/prefect/healthcheck.py", line 63, in import_flow_from_script_check
        flows.append(extract_flow_from_file(file_path=flow_file_path))
      File "/usr/local/lib/python3.8/site-packages/prefect/utilities/storage.py", line 86, in extract_flow_from_file
        exec(contents, exec_vals)
      File "<string>", line 129, in <module>
    NameError: name '__file__' is not defined
    b
    Michael Adkins
    +2
    19 replies
    Copy to Clipboard
  • e

    Enda Peng

    1 year ago
    Is there any tips for using local agent and local run? I find it is really error prone. e.g I have a file
    foo.py
    where
    flowA
    is encoded. I can easily run into following cases: • register with
    -p ./foo.py
    , it doesn’t work while
    -p foo.py
    works. • Under same folder
    /pipelines/
    there are two files
    flow.py, common_task.py
    , I can also run into import error, sometimes
    from .common_task import xxx
    works sometimes not, depending on how PYTHONPATH is set. So far my experience is to make sure local agent run on the same level where my
    resiger
    command is called, no leading dot in register command etc. Curious about whether ppl have better ideas on how to manage the entire process.
    e
    Kevin Kho
    4 replies
    Copy to Clipboard
  • Fabrice Toussaint

    Fabrice Toussaint

    1 year ago
    Hi everyone, Can someone explain to me how I integrate Sentry with Prefect? Do I need to initialize it in each flow or? Just adding it to my .py files does not work unfortunately when the flow is being registered. Sentry: https://docs.sentry.io/platforms/python/
    Fabrice Toussaint
    Kevin Kho
    7 replies
    Copy to Clipboard
  • Salohy

    Salohy

    1 year ago
    Hi every one,  I have this error when using SqlServerExecute `ImportError: Using
    prefect.tasks.sql_server
    requires Prefect to be installed with the "sql_server" extra`. I am using, docker for storage using a docker file as explained here. My code looks like this
    from prefect.tasks.sql_server import SqlServerExecute
    
    STORAGE = Docker(registry_url="<http://xxx.azurecr.io|xxx.azurecr.io>",
             image_name="prefect/test",
             dockerfile="Dockerfile",
             python_dependencies=["pyodbc"])
    
    SQL = SqlServerExecute(db_name="myDb",
                user="user",
                host="<tcp:xxx.database.windows.net>",
                port=1433,
                driver="ODBC Driver 17 for SQL Server")
    
    QUERY = """
      CREATE TABLE [dbo].[myTable] (
        [id] VARCHAR(22) COLLATE Latin1_General_100_BIN2 NOT NULL,
        [FirstName] VARCHAR(222) NULL,
        [LastName] VARCHAR(222) NULL
      )
    """
    
    @task
    def create_table():
      logger = prefect.context.get('logger')
      <http://logger.info|logger.info>("Create table in DW for loading the results")
      SQL.run(query=QUERY, password='myPass')
    
    with Flow("candidates-flow", storage=STORAGE, run_config=RUN_CONFIG, executor=EXECUTOR) as flow:
      create_table()
    Can someone help? I do not understand the error. Many thanks already 🙏
    Salohy
    Kevin Kho
    23 replies
    Copy to Clipboard