feliu opened a new issue #2615: Python 3.6.1 action not writing logs when
print('something') on Ubuntu 14 LTS
URL: https://github.com/apache/incubator-openwhisk/issues/2615
I have an issue using the Python 3.6.1 action. The actions work correctly
but doesn't print anything in the log when using print or even when making a
syntax error making difficult to trace the errors when developing the function.
## Environment details:
* Native ubuntu 14.04.3 LTS following this sequence of instructions
https://github.com/apache/incubator-openwhisk/tree/master/tools/ubuntu-setup
## Steps to reproduce the issue:
1. Create this Python function:
```
import json
import sys
import platform
def main(dic):
try:
print("hello")
return {'result': platform.python_version()}
except Exception as e:
return {'error': str(e)}
```
2. wsk action create facebook_api --kind python:3 __main__.py
3. wsk action invoke facebook_api --blocking
```
ok: invoked /_/facebook_api with id 2a68e2200f5d4187aa70f577e37fe1bb
{
"activationId": "2a68e2200f5d4187aa70f577e37fe1bb",
"annotations": [
{
"key": "limits",
"value": {
"logs": 10,
"memory": 256,
"timeout": 7200000
}
},
{
"key": "path",
"value": "guest/facebook_api"
}
],
"duration": 725,
"end": 1502682035696,
"logs": [],
"name": "facebook_api",
"namespace": "guest",
"publish": false,
"response": {
"result": {
"error": "The action failed to generate or locate a binary. See
logs for details."
},
"status": "action developer error",
"success": false
},
"start": 1502682034971,
"subject": "guest",
"version": "0.0.7"
}
```
4. Now erase the line --> print("hello")
5. update and invoke..
```
ok: invoked /_/facebook_api with id be44e2456322437da4efa2e034d9a354
{
"activationId": "be44e2456322437da4efa2e034d9a354",
"annotations": [
{
"key": "limits",
"value": {
"logs": 10,
"memory": 256,
"timeout": 7200000
}
},
{
"key": "path",
"value": "guest/facebook_api"
}
],
"duration": 736,
"end": 1502682215005,
"logs": [],
"name": "facebook_api",
"namespace": "guest",
"publish": false,
"response": {
"result": {
"result": "3.6.1"
},
"status": "success",
"success": true
},
"start": 1502682214269,
"subject": "guest",
"version": "0.0.9"
}
```
7. If I try the same in the IBM Bluemix I can see all the logs perfectly
<img width="1025" alt="untitled"
src="https://user-images.githubusercontent.com/3466358/29257710-5eb42ec6-80de-11e7-9c69-3a839ec5ee5a.png">
Is anybody finding troubles to output logs from stdout or stderr in Ubuntu
native installation using CouchDB and Python 3.6.1 actions?
Thanks to all for the help!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services