apache / apache/openwhisk-composer-python

sample does not work with openwhisk python 3 runtime

Aperta
#15 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
9
Fork
12
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.