apache / openwhisk-runtime-python

Apache OpenWhisk Runtime Python supports Apache OpenWhisk functions written in Python
https://openwhisk.apache.org/
Apache License 2.0
50 stars 70 forks source link

AI Action example: ImportError: No module named 'inference' #45

Closed aviweit closed 5 years ago

aviweit commented 5 years ago

Environment details:

Steps to reproduce the issue:

Following instructions at https://github.com/apache/incubator-openwhisk-runtime-python/blob/master/core/python3AiAction/samples/smart-body-crop/crop.ipynb

  1. Invoke:
    docker run -it -p 8888:8888 -e OPENWHISK_AUTH=`cat ~/.wskprops | grep ^AUTH= | awk -F= '{print $2}'` -e OPENWHISK_APIHOST=`cat ~/.wskprops | grep ^APIHOST= | awk -F= '{print $2}'` --rm -v `pwd`:/notebooks/sf  --entrypoint jupyter-notebook adobeapiplatform/openwhisk-python3aiaction:0.11.0  --notebook-dir=/notebooks --ip 0.0.0.0 --no-browser --allow-root
  2. Open FireFox and point it to the URL that is output by Jupyter Notebook container.
  3. New -> Notebook: python3
  4. Copy the following block
    
    from matplotlib import pyplot as plt
    import matplotlib.patches as patches

%matplotlib inline from inference import SmartBodyCrop from PIL import Image import numpy as np

4. Hit `Run` button

## Provide the expected results and outputs:
I would expect the code snippet to execute with out errors so that I can proceed with the next step in the instructions.

## Provide the actual results and outputs:

ImportError Traceback (most recent call last)

in () 3 4 get_ipython().run_line_magic('matplotlib', 'inline') ----> 5 from inference import SmartBodyCrop 6 from PIL import Image 7 import numpy as np ImportError: No module named 'inference' ```
aviweit commented 5 years ago

It works well now. I invoked the notebook from a wrong location. I am closing the issue.