apache / apache/openwhisk-composer-python

sample does not work with openwhisk python 3 runtime

未关闭
#15 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
9
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。