1

I am following this tutorial on Google Cloud Endpoints. I am having trouble at the "Generating the OpenApi configuration file" section. Specifically, when I invoke the Endpoints tool.

The Traceback is saying that the file on lib/Crypto/Random/init.py "from Crypto.Random import OSRNG" is producing the import error.

What I have done so far

  1. Looked at the path lib/Crypto/Random and saw a folder named OSRNG - thus made sure that there was a folder called OSRNG (I didnt see any py file name OSRNG.py though)
  2. Followed the answer for this question by putting the pycrypto version to "latest" in the app.yaml file.
  3. Looked into this question but doesnt apply.
  4. Looked into this question by specifying the version rather than "latest" in app.yaml.

I don't understand why it is saying there is an import error when I can literally see the package/module in the directory.

Can someone help why it is producing an import error?

4
  • What is the result of this command? echo $ENDPOINTS_GAE_SDK. It should be /usr/lib/google-cloud-sdk/platform/google_appengine, as mentioned in step 11.
    – Mangu
    May 4, 2018 at 11:12
  • hi @Mangu yeap, I did that. However, the sdk isnt installed in /usr/lib like yours. it is just installed in ~/home/gilho/ . Didn think that was a problem.
    – Gil
    May 5, 2018 at 5:08
  • Did changing the location of the SDK solved the issue?
    – Mangu
    May 7, 2018 at 7:03
  • i will give it a go. Would be weird if it worked because the documentation said that it doesnt matter where the sdk is installed
    – Gil
    May 11, 2018 at 4:21

1 Answer 1

0

Are you running on OSX? I encountered a similar problem and the solution for me was installing google-endpoints (which for some reason is missing from the instructions):

pip install -t lib google-endpoints --ignore-installed

2
  • Im running ubuntu. I did that (installing google-endpoints). still no luck.
    – Gil
    May 2, 2018 at 10:23
  • I'm hitting the same problem: echo $ENDPOINTS_GAE_SDK returns empty string I've installed: pip install -t lib google-endpoints --ignore-installed in both -t lib and in my local virtual env not sure what to try next??
    – Dewey
    Mar 6, 2019 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.