You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2021/03/18 20:42:26 UTC

[GitHub] [openwhisk-composer-python] rabbah opened a new issue #15: sample does not work with openwhisk python 3 runtime

rabbah opened a new issue #15:
URL: https://github.com/apache/openwhisk-composer-python/issues/15


   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)
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org