I'm trying to write my first google app engine sample, with django.
I followed:
https://cloud.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python
and then:
https://console.developers.google.com/start/appengine?_ga=1.115566598.1847531954.1430589011
but I was unable to run it:
when I'm trying to run the sample locally (python manage.py runserver 0.0.0.0:8000)
I'm getting: ImportError: No module named google3.storage.onestore.v3
any idea?
Thanks!
You're attempting to run the Django development server, not the App Engine development server. You need to be running the latter so that import paths can be adjusted.
Related
Hello I'm having this problem when trying to deploy a django application to aws, the app runs perfectly locally but when trying to deploy to aws this error shows up.
like this
I tried to install that manually, but it doesn't work that way.
If the docker version for your deployment runner is 20.x - it's probably this https://github.com/docker/compose/issues/8105
Try pinning the deploy docker version to 19.03.13ce-1
My team and I are looking to deploy a python app engine project locally using dev_appserver. The application seems to be working when we deploy to GCP and access as an end user would, but when deploying via dev_appserver and python main.py, we are seeing errors in both the browser and in the terminal:
When deploying via dev_appserver, we see the following:
'Standard' 500 HTTP error in Chrome Browser:
Also see a 301 error in the command line:
When deploying via python main.py, we see the following:
Import Error: No module named appengine.api
Appreciate the time reading through this post and hope to get this resolved as everything else I've read on other SO posts/forums elsewhere has not provided any help.
Thanks all.
I'm deployed an app to Google Cloud using this tutorial. The app is made using Flask and makes use of flask-sqlalchemy (and thus sqlalchemy).
I can load pages that don't make use of sqlalchemy fine, but pages that do raise a 500 error. The error page shows ImportError: No module named _sqlite3.
I suspect it has something to do with me trying to install a Python3 library to gcloud's Python2.7 environment, but I don't know how to fix this. Who can help me?
Have a look at Google's examples here for App Engine Standard, Cloud SQL and Python:
https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/cloud-sql
There's one for MySQL and another for PostgreSQL.
The tutorial link you shared does not appear to include a database component so I'm assuming you've evolved the example and that you're planning to use Google Cloud SQL database service for your backend.
You're likely missing a Python package that provides SQL connectivity (Google uses PyMySQL)
Rails run on Cloud9 without any problem.
What I want to do is as follows:
run Rails on Heroku
run python program by rake task in Rails (especially python for access AWS s3 by boto to get some.)
current condition is as follows:
Case 1: deployed rails to heroku without any changing.
The deploy could be success and there is no problem to run rails app via Web browser. but rails server shows error log (by heroku log --tail )
an error shows "No module named boto"
Case 2: deployed rails to heroku file named requirements.txt on root.
Heroku didn't detect it as Ruby Rails app so that rails server didn't run.
rails server shows error log (by heroku log --tail ) as
heroku[router]: at=error code=H14 desc="No web processes running"
Case 3: deployed rails first as same as case 1. Then, add Python on Buildpacks on Heroku setting, then add requirements.txt, finally deploy again. then it's deployed. but rails server shows error log (by heroku log --tail ) as same as Case3.
if I could run command like pip, it will be easy, but it's impossible.
is there any idea to solve the above?
Instead of trying to install your custom boto on Heroku, just place your custom boto folder in your project's directory (at the same level as your project's apps). Thereafter, you can import the boto folder using the import statement. You can read about importing a module here
Although, the ideal way to do it is to use the Rails SDK for AWS instead of using the Python SDK for AWS and then trying to use it with Rails. All the functionality available with Boto is available with the SDK for Ruby as well.
Check
http://docs.aws.amazon.com/sdk-for-ruby/v2/developer-guide/
I am developing my application in google app engine now i am using Google Cloud SQL. It runs at localhost perfectly,, But when i am deploying my application to server it gives me following error.
ImportError: No module named MySQLdb
Later i have copied MySQLdb package to application directory. Now it is giving me error
ImportError: No module named _mysql.
What i am doing wrong here , Any guideline ?
MySQLdb might be missing in your app.yaml. This library should be there so that Google App Engine loads it for your instance. Hope this will help.
libraries:
- name: MySQLdb
version: "latest"
Looking at the docs that does not seem to be how you do it at all.
Building an application with a local MySQL instance
from google.appengine.api import rdbms
CLOUDSQL_INSTANCE = ''
DATABASE_NAME = 'guestbook'
USER_NAME = 'username'
PASSWORD = 'password'
def get_connection():
return rdbms.connect(instance=CLOUDSQL_INSTANCE, database=DATABASE_NAME,
user=USER_NAME, password=PASSWORD, charset='utf8')
This tutorial got my app eventually working...
What I did: I created a very basic project (just one simple app with one model) and followed above tutorial to get it working in my development environment and on GAE. Then migrated my code from my old (non-GAE) project to the new project. All was fine.
The bad news: it still takes some effort getting a new project properly deployed on GAE and Cloud SQL. I have never managed to get it working in one go. You have to really scrutinise the GAE logs.