Tyndyll

    Tyndyll

    4 months ago
    Can someone help with a flow running problem using Github storage?
    I've registered the flow sucessfullly with Prefect cloud, but when trying to execute on an agent I am getting an
    ImportError('Unable to import Github, please ensure you have installed the github extra')
    error. As far as I am aware it has been installed
    prefect@ubuntu-focal:~$ . prefect-default/bin/activate
    (prefect-default) prefect@ubuntu-focal:~$ python
    Python 3.8.10 (default, Mar 15 2022, 12:22:08)
    [GCC 9.4.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> from prefect.storage import GitHub
    >>>
    Anna Geller

    Anna Geller

    4 months ago
    prefect.storage.GitHub is just the Prefect class for interacting with GitHub, you also need to install the
    github
    Python library, e.g. using:
    pip install "prefect[github]"
    Tyndyll

    Tyndyll

    4 months ago
    Got it - was installed in the system environment but not the venv
    While you're here - should it pull down the entire repo?
    (And thank you by the way - sorry - trying to get a demo ready for someone)
    Anna Geller

    Anna Geller

    4 months ago
    technically yes, it will pull the entire repo but you shouldn't rely on the presence of the entire codebase in your execution environment - you should treat it as if this would pull only the flow code
    Tyndyll

    Tyndyll

    4 months ago
    Good to know! Thanks
    Tarek

    Tarek

    3 months ago
    hi, i have the same import problem, i executed
    pip install "prefect[github]"
    locally, but the problem persists, or should be installed on the agent docke container also?
    Anna Geller

    Anna Geller

    3 months ago
    yes, it should, correct - it depends on your setup though - feel free to open a separate thread so that it's easier to track