2020-07-01 00:07:24 UTC - ac427: After troubleshooting for hours i realized 
most of the images in openwhisk repos use python2 for Python3 examples and when 
you run functions it used sys. path for python2. I ended up building my own 
image 
<https://hub.docker.com/r/anantac/ibmfunction_asoc/dockerfile|https://hub.docker.com/r/anantac/ibmfunction_asoc/dockerfile>
<https://hub.docker.com/r/anantac/ibmfunction_bionic/dockerfile|https://hub.docker.com/r/anantac/ibmfunction_bionic/dockerfile>
+1 : Rodric Rabbah
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1593562044029500?thread_ts=1593318409.020400&cid=C3TPCAQG1
----
2020-07-01 13:58:31 UTC - Rodric Rabbah: Do you have a reference to the p2 
examples that should be updated to p3?
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1593611911033500?thread_ts=1593318409.020400&cid=C3TPCAQG1
----
2020-07-01 14:51:56 UTC - ac427: You know may be i did some mistake during my 
test. i can't reproduce now, but one issue is i see references to pip instead 
of pip3 and python instead of python3 
<https://github.com/apache/openwhisk/blob/master/tools/actionProxy/Dockerfile#L18>
<https://hub.docker.com/r/openwhisk/dockerskeleton/dockerfile>
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1593615116033800?thread_ts=1593318409.020400&cid=C3TPCAQG1
----
2020-07-01 14:53:16 UTC - ac427: i can't remember what image i used, but i 
tested something like this last week
```[abc@foo qux]$ cat main.py 
import os
import sys

def main(args):
    return {"body": str(sys.path) }
[abc@foo qux]$ ibmcloud fn action delete foo ; ibmcloud fn action create foo 
main.py --docker openwhisk/python3action --web true
ok: deleted action foo
ok: created action foo
[abc@foo qux]$ curl --header "Content-Type: application/json" -d 
'@/home/abc/foo.json' 
<https://us-east.functions.cloud.ibm.com/api/v1/web/github_foo_test/default/foo>
['/pythonAction', '/usr/local/lib/python36.zip', '/usr/local/lib/python3.6', 
'/usr/local/lib/python3.6/lib-dynload', 
'/usr/local/lib/python3.6/site-packages', '../actionProxy'][abc@foo qux]$ 
[abc@foo qux]$ ibmcloud fn action delete qux ; ibmcloud fn action create qux 
main.py --docker ibmfunctions/action-python-v3.7 --web true
ok: deleted action qux
ok: created action qux
[abc@foo qux]$ curl --header "Content-Type: application/json" -d 
'@/home/abc/foo.json' 
<https://us-east.functions.cloud.ibm.com/api/v1/web/github_foo_test/default/qux>
['/action/1/src', '/usr/local/lib/python37.zip', '/usr/local/lib/python3.7', 
'/usr/local/lib/python3.7/lib-dynload', 
'/usr/local/lib/python3.7/site-packages']```
https://openwhisk-team.slack.com/archives/C3TPCAQG1/p1593615196034000?thread_ts=1593318409.020400&cid=C3TPCAQG1
----

Reply via email to