• Quicky

    Ah right, cheers for that Jon. Obvious questions are welcome at my level! That's pointed me in the right direction, it looks like pip hasn't picked up on the dependencies. Thanks for the advice with regards to workarounds.

    posted in Pythonista read more
  • Quicky

    Cheers, here's the trace

    Traceback (most recent call last):
    File "/private/var/mobile/Containers/Shared/AppGroup/98568767-10B5-4B13-A6E1-34E319B6C605/Pythonista3/Documents/Quickify/quickstart.py", line 10, in <module>
    import googleapiclient.discovery
    File "/private/var/mobile/Containers/Shared/AppGroup/98568767-10B5-4B13-A6E1-34E319B6C605/Pythonista3/Documents/site-packages-3/googleapiclient/discovery.py", line 49, in <module>
    import google.api_core.client_options
    ModuleNotFoundError: No module named 'google.api_core'

    The pip installs I ran were:

    pip install google-api-python-client
    pip install google-auth-oauthlib google-auth-httplib2

    For testing before trying to get it working on my own script, I'm using Google's example for getting a YouTube channel list:

    # -*- coding: utf-8 -*-
    # Sample Python code for youtube.channels.list
    # See instructions for running these code samples locally:
    # https://developers.google.com/explorer-help/guides/code_samples#python
    import os
    import google_auth_oauthlib.flow
    import googleapiclient.discovery
    import googleapiclient.errors
    scopes = ["https://www.googleapis.com/auth/youtube.readonly"]
    def main():
        # Disable OAuthlib's HTTPS verification when running locally.
        # *DO NOT* leave this option enabled in production.
        os.environ["OAUTHLIB_INSECURE_TRANSPORT"] = "1"
        api_service_name = "youtube"
        api_version = "v3"
        client_secrets_file = "client_secret.json"
        # Get credentials and create an API client
        flow = google_auth_oauthlib.flow.InstalledAppFlow.from_client_secrets_file(
            client_secrets_file, scopes)
        credentials = flow.run_console()
        youtube = googleapiclient.discovery.build(
            api_service_name, api_version, credentials=credentials)
        request = youtube.channels().list(
        response = request.execute()
    if __name__ == "__main__":
        main() ```

    posted in Pythonista read more
  • Quicky

    Hi, relative Python newcomer here, but with a couple of scripts under my belt, developed on Windows. I've been playing with Pythonista the last few days, but I'm struggling with one aspect. I've installed stash, from there installed some modules via pip, but the script I've written produces a Module Not Found error every time I run it.

    My script resides in a folder under Documents/myapp on This iPad but when running it consistently fails to find the pip installed modules in site-packages-3. The modules in question are google.api_core and google.auth.

    Is this some kind of permissions issue? Happy to give more information if it helps.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!