Google App Engine "no module named requests" PyDev - google-app-engine

I downloaded and installed requests library for Python 2.7. Using the shell I can make "import requests" and actually use it without problems.
Thing is that when running Google App Engine it can't find it and prompts the error:
ImportError: No module named requests
I'm using PyDev-Eclipse as IDE for my project and tried adding the path (/usr/local/lib/python2.7/dist-packages/requests) both in
Project > properties > PyDev - PYTHONPATH > External Libraries
and in
Window > preferences > Pydev -Interpreter > Libraries
and none worked! Still having the same issue when trying to run my GAE app
Anyone could help?
Thanks!

Any 3rd party lib you use must be physically included in your project and deployed to appengine. This means it is not sufficient to just install with easy_install or pip
See the docs https://developers.google.com/appengine/docs/python/runtime#Pure_Python

Related

Intellij Keeps Telling Me "App Engine SDK path is not correct.'

Trying to deploy my first Google Cloud Java app using Intellij. I've followed and read so many threads and have gotten absolutely nowhere on what is seemingly one of the simplest steps of getting this set up. I have installed gcloud CLI and followed the instructions here. After installing, I run the commands 'gcloud components update' and 'gcloud components install app-engine-java'. I see the folder located in both 'C:\Users<username>\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine' and 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine'. I installed as multi user after hours of trying to get the single user install working, so now I have both. When in Intellij I am creating a new Google App Engine project under Java EE, it asks to specify a Google app engine SDK. There are no options so I choose to select the path. I have tried both above paths and it only tells me 'App Engine SDK path is not correct'. What am I doing wrong?? The steps seem ridiculously simple and it just doesn't work.
You stopped at the general google app engine folder
You need to specify the full path to the java-sdk folder, see the image in this question.

GCloud AppEngine under Eclipse doesn't start (Mac OS)

I want to run a GCloud App Engine (Spring Boot Application) in Eclipse under Mac OS. When I start the App Engine, I get the following error:
The Google Cloud SDK could not be found in the customary locations and no path was provided. -> [Help 1]
The SDK is installed, the installation path is set to the PATH variable. The app-engine-java component is also installed. Eclipse also finds the installed SDK and the Eclipse Plugin for Google Cloud is also installed.
Does anyone have an idea what the problem could be?
Adding the following to the module's build.gradle might help:
appengine.tools.cloudSdkHome="/Users/marioyoussef/Desktop/google-cloud-sdk"
OR
Create a symlink inside your user folder to the installation folder of the GCloud SDK.
Ah, it's working now.
Solution is to create a symlink inside your user folder to the installation folder of thew GCloud SDK.

PyDev PDFMiner GAE: ImportError: No module named pdfminer.converter

I work on GAE project in PyDev
I'd like to use the PDFminer library in order to convert a pdf file to a text file.
My problem is when i run the application it dosn't work and it displays this error message :
ImportError: No module named pdfminer.converter
I tested the same code in a normale python project and it works fine.
I used the same code in python console and it works too
I add the pdfminer folder to the python interpreter, i removed the interpreter and i add it again but i have always the same error.
Really i don't what i have to do, can anybody help me please ?
The problem comes from the fact that the PDFMiner is a third party library i copied the PDFMiner's files into the project and i works fine GAE don't import lib if isn't a pure python even if it exits in PYTHONPATH I found the solution in this post: Google App Engine "no module named requests" PyDev

Can't import library into Google App Engine project

I use the Google App Engine SDK 1.8.5 with Eclipse 3.8 on Ubuntu.
I want to add the Cloud Storage service to my app, so I downloaded guava-gwt-15.0.jar and appengine-gcs-client-0.3.jar, and put them in my apps /war/WEB-INF/lib/ folder. I also added these jars to the build path in Eclipse.
When I fire up my app in dev mode, it runs fine, at least until I try to access a page relevant to the GCS library. When I do that, I get the following error:
java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at com.google.appengine.tools.cloudstorage.GcsServiceImpl.<init>(GcsServiceImpl.java:35)
at com.google.appengine.tools.cloudstorage.GcsServiceFactory.createGcsService(GcsServiceFactory.java:32)
... etc
I cleaned my project and restarted Eclipse multiple times, and still the problem persists. What to do?
In addition to Guava for GWT, you also need the core Guava library (guava-15.0.jar). Download the .jar to war/WEB-INF/lib and add it to you build path as well.

How to solve the jpa error?

i created one web application for accessing google bigtable.
but i shows the following error how to solve this
Description Resource Path Location Type
Your Web Application Project must be configured to use a JDK in order to use JSPs. guestbook.jsp /cftljpa/war Unknown Google App Engine Problem
how to solve this
Both the local App Engine server and the deployment process need to run javac in order to compile your JSPs. If your project isn't set to use a JDK ("Java Development Kit", which includes javac), then the JSPs can't be compiled.
Go to Preferences > Java > Installed JREs and make sure that you have a JDK installed -- if you don't, you can easily download one. Now right-click on your project and choose Properties > Java Build Path > Libraries and make sure that your project is using this JDK

Resources