Skip to content

sample does not work with openwhisk python 3 runtime #15

@rabbah

Description

@rabbah

You can use this sample code (save as fn.py):

import types
import marshal
import base64
__code__= types.FunctionType(marshal.loads(base64.b64decode(bytearray('4wEAAAAAAAAAAAAAAAEAAAADAAAAUwAAAHMQAAAAZAF8AGQCGQBkA2sCaQFTACkETtoFdmFsdWXaCHBhc3N3b3Jk2gZhYmMxMjOpAKkB2gRhcmdzcgQAAAByBAAAANoIPHN0cmluZz7aCDxsYW1iZGE+BQAAAPMAAAAA', 'ASCII'))), {})
def main(args):
    return __code__(args)

And run it locally:

> docker run -d -p 8080:8080 openwhisk/python3action:nightly
> openwhisk/tools/actionProxy/invoke.py init fn.py
{"error":"The action failed to generate or locate a binary. See logs for details."}

The container logs show:

Traceback (most recent call last):
ValueError: bad marshal data (unknown type code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions