Containers and Kubernetes

Get Involved. Join the Conversation.

Topic

    Ranjans
    unable to invoke the function in oci
    Topic posted August 22, 2019 by Ranjans Red Ribbon: 250+ Points, last edited August 22, 2019, tagged Containers, Docker 
    24 Views, 1 Comment
    Title:
    unable to invoke the function in oci
    Summary:
    unable to invoke the function in oci
    Content:

    As per Python SDK , when I am importing the config value, the function is not getting invoke and is error out . The function has been built using python .

    The following command is used to invoke the function

    fn invoke  app_py pythonfn

     

    *************************

    import json
    import io
    import oci
    from oci.config import from_file
    import sys
    from fdk import response


    config = from_file(profile_name="DEFAULT")
    print(conf)

    def handler(ctx, data: io.BytesIO=None):


        try:
            body = json.load(data)
    .................
    ....................
    ..........................

    Comment

     

    • Hassan Ajan

      Hi, 

      How did you start the project? did you initialise it like this: 

      fn init --runtime python pythonfn