singhsegv opened a new issue, #5480:
URL: https://github.com/apache/openwhisk/issues/5480

   <!--
   We use the issue tracker for bugs and feature requests. For general 
questions and discussion please use https://openwhisk.apache.org/slack.html or 
https://openwhisk.apache.org/community.html instead.
   
   Do NOT share passwords, credentials or other confidential information.
   
   Before creating a new issue, please check if there is one already open that
   fits the defect you are reporting.
   If you open an issue and realize later it is a duplicate of a pre-existing
   open issue, please close yours and add a comment to the other.
   
   Issues can be created for either defects or enhancement requests. If you are 
a committer than please add the labels "bug" or "feature". If you are not a 
committer please make clear in the comments which one it is, so that committers 
can add these labels later.
   
   If you are reporting a defect, please edit the issue description to include 
the
   information shown below.
   
   If you are reporting an enhancement request, please include information on 
what you are trying to achieve and why that enhancement would help you.
   
   For more information about reporting issues, see
   
https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md#raising-issues
   
   Use the commands below to provide key information from your environment:
   You do not have to include this information if this is a feature request.
   -->
   
   I am trying to deploy a basic python action with an included virtualenv. I 
followed 
[this](https://github.com/apache/openwhisk/blob/master/docs/actions-python.md#packaging-python-actions-with-a-virtual-environment-in-zip-files)
 official tutorial of using `openwhisk/python3action` container to create a 
`virtualenv` and zipping it with __main__.py file. But i still get an `module 
not found` error while actually running that action.
   
   ## Environment details:
   
   * Deployed on MacOS using the 
[openwhisk-deploy-kube](https://github.com/apache/openwhisk-deploy-kube) repo
   * Docker version 24.0.2, build cb74dfc
   * K8s version v1.27.2
   
   ## Steps to reproduce the issue:
   
   1. Follow the `Packaging Python actions with a virtual environment in zip 
files` step from this official tutorial 
https://github.com/apache/openwhisk/blob/master/docs/actions-python.md#packaging-python-actions-with-a-virtual-environment-in-zip-files
   2. Add `networkx` or any other non standard module.
   3. Create an action and try invoking it
   
   
   ## Provide the expected results and outputs:
   
   
   ## Provide the actual results and outputs:
   
   ```
    "logs": [
           "2024-05-01T17:42:09.338809562Z stdout: Traceback (most recent call 
last):",
           "2024-05-01T17:42:09.338871934Z stdout:   File \"exec__.py\", line 
44, in <module>",
           "2024-05-01T17:42:09.33888039Z  stdout:     from main__ import main 
as main",
           "2024-05-01T17:42:09.338884751Z stdout:   File 
\"/action/1/bin/main__.py\", line 1, in <module>",
           "2024-05-01T17:42:09.338889153Z stdout:     import networkx as nx",
           "2024-05-01T17:42:09.338892881Z stdout: ModuleNotFoundError: No 
module named 'networkx'",
           "2024-05-01T17:42:09.355858711Z stdout: Command exited abruptly 
during initialization.",
           "2024-05-01T17:42:09.430444173Z stderr: The action did not 
initialize or run as expected. Log data might be missing."
       ],
   
   ```
   
   ## Additional information you deem important:
   * My guess is that there might be some issue while loading the virtualenv. 
Not sure where to debug it in 
[openwhisk-runtime-python](https://github.com/apache/openwhisk-runtime-python)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to