I am running a webapp2 sever in Google Cloud SDK and making use of the Naked
module to run node.js scripts from python2 in a Vagrant box.
While starting the server which has this code snippet
from Naked.toolshed.shell import muterun_js
def get_signed_hash(username):
response_from_js = muterun_js('./views/api/generateSignedTransaction.js',
nonce)
signed_hash = response_from_js.stdout
print('0x' + signed_hash)
I am getting this error message
ImportError: No module named Naked.toolshed.shell
I am making use of the requests
library as well and that is not causing any problems. Tried to debug the problem as to maybe the location of the packages, they are both in the same place:
>>> import requests
>>> print(requests.__file__)
/home/vagrant/.local/lib/python2.7/site-packages/requests/__init__.pyc
>>> import Naked
>>> print(Naked.__file__)
/home/vagrant/.local/lib/python2.7/site-packages/Naked/__init__.pyc
Infact I ran the script in the same location as a standalone file calling get_signed_hash('username')
and it runs successfully. Is there any other place I need to check?