apache / apache/openwhisk-composer-python
sample does not work with openwhisk python 3 runtime
- Vorherrschende Sprache
- Python
- Sterne
- 9
- Forks
- 12
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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)
```
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.