Thread
#data-tricks-and-tips
    a

    Angel Acosta

    3 weeks ago
    Hello again, I am trying to use the github storage block. I create the block, here is the url https://github.com/AngelSantiagoAcosta/prefect_sb . I run the agent and run the deployment with defaults. here is the deployment string: prefect deployment build lis_qc.py😛rocess_lis_data --name lis_qc_deployment -q "lis qc queue" -sb github/my-github --apply . the agent returns the following error: OSError: Failed to pull from remote: 'g' is not recognized as an internal or external command, operable program or batch file.
    Cole Murray

    Cole Murray

    3 weeks ago
    Can you provide: • Version of prefect you are running • Full stack trace
    a

    Angel Acosta

    3 weeks ago
    2.3.1
    15:04:12.845 | ERROR   | Flow run 'burgundy-shellfish' - Flow could not be retrieved from deployment.
    Traceback (most recent call last):
      File "C:\Users\AngelAcosta\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\engine.py", line 256, in retrieve_flow_then_begin_flow_run    
        flow = await load_flow_from_flow_run(flow_run, client=client)
      File "C:\Users\AngelAcosta\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\client.py", line 103, in with_injected_client
        return await fn(*args, **kwargs)
      File "C:\Users\AngelAcosta\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\deployments.py", line 54, in load_flow_from_flow_run
        await storage_block.get_directory(from_path=deployment.path, local_path=".")
      File "C:\Users\AngelAcosta\AppData\Local\Programs\Python\Python310\lib\site-packages\prefect\filesystems.py", line 796, in get_directory
        raise OSError(f"Failed to pull from remote:\n {err_stream.read()}")
    OSError: Failed to pull from remote:
     'g' is not recognized as an internal or external command,
    operable program or batch file.
    I tried starting from scratch with a new repo, and a basic flow, I encountered the same error. not sure if its something wrong with my environment. I can clone a repo with git bash cli with no issue.
    Cole Murray

    Cole Murray

    3 weeks ago
    Have you already configured the block in a separate part of code? Here is the PR that added support for GH. Specifically, you need this part:
    from prefect.filesystems import GitHub
    
    g = GitHub(repository="<https://github.com/PrefectHQ/prefect.git>", reference="github-deployments")
    g.save("example")
    The -sb argument should be referencing the name of this block, not your github repo (although they could share the same name)
    a

    Angel Acosta

    3 weeks ago
    I created the block before I build the deployment. I watched a few recent videos of it being referenced in command line instead of doing things in code. here is the video I referenced, the github stuff starts around 1:50 https://www.loom.com/share/99c44aff47364a89abe3461c807fb545