wonsun Jeong

    wonsun Jeong

    3 months ago
    Hi.. I got this error `ValueError: A
    path
    must be provided to show where flow
    .py
    file is stored.` My flow code like this!
    with Flow('flow_step1', storage=Local()) as flow:
        engine = create_engine('<mysql+pymysql://wonsun.jeong>:~~~~~~~~~~~~~~~', echo=True)
        connection = engine.connect()
        
        before = check_db()
        after = check_storage()
        
        answer = coin_inspection(after, before)
        
        with case(answer, False):
            new_datas = action_if_false()
            raw_extract = each_file_info.map(new_datas)
            final = each_ecg_meta.map(raw_extract)
            
        with case(answer, True):
            action_if_true()
               
    
    flow.storage = Local(stored_as_script=True)
    flow.register(project_name='try')
    flow.run() 
    # flow.visualize()
    This python file name is 'flow_step1.py'. What's the problem?? Also, most weird thing is window(local) already run 'flow_step1' and create result files but prefect web UI can't detect this flow! I'm so confused because i don't understand exactly Flow, Register, Agent, Server, Local, Path.. in Prefect. Help me please.. 🤯
    Kevin Kho

    Kevin Kho

    3 months ago
    If using
    stored_as_script=True
    , you need to point to where the file lives with
    path
    .
    flow.storage=Local(path=...,stored_as_script=True
    wonsun Jeong

    wonsun Jeong

    3 months ago
    The file you mentioned is the python code for define flow? In this case write this.
    flow.storage=Local(path='C:\\Users\\user\\.prefect',stored_as_script=True)
    Right?
    Kevin Kho

    Kevin Kho

    3 months ago
    Yep the doc string will have more detail
    wonsun Jeong

    wonsun Jeong

    3 months ago
    Thanks Kevin! Don't panic..😂