No module named _ssl - python

I have created a Google app engine app which searches tweets for a specific query and stores in the GAE datastore.
To connect to twitter I am using twitter/sixohsix python library. When I tried to run the app I am getting this error:
ImportError: No module named _ssl
INFO 2013-11-10 09:09:37,112 server.py:561] default: "GET / HTTP/1.1" 500 -
I don't understand whether the problem is with the twitter library or with GAE sockets!
Note: when i type import ssl in python idle, it works fine i.e. it is able to import the module.

If the library works on the production server but not on the development server, then it's most likely a bug with the SDK as it is not emulating the production setup properly.
There is an (accepted) issue just like yours already in the bug tracker: https://code.google.com/p/googleappengine/issues/detail?id=9246&q=_ssl&colspec=ID%20Type%20Component%20Status%20Stars%20Summary%20Language%20Priority%20Owner%20Log .

Related

Google Calendar Api: ModuleNotFoundError: No module named 'google.appengine' - Works locally but not on server

I am trying to use the Google Calendar API on my Web Application to create/update events.
Locally my application works flawlessly. All Google Calendar event creations and updates work as expected. When I try to deploy the exact same code onto the server and use it I get these three errors listed below in this exact order.
ModuleNotFoundError: No module named 'google.appengine'
ModuleNotFoundError: No module named 'oauth2client'
ImportError: file_cache is unavailable when using oauth2client >= 4.0.0 or google-auth
Does anyone have any idea why these errors would be happening and how to fix them?
Thanks!

Google App Engine can't run dev_appserver (500/301 error & appengine.api Import Error)

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.

ImportError: No module named _sqlite3 after deploying Flask app to gcloud

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)

ImportError: No module named **** Error in google app engine

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.

Running web.py on Dreamhost

I am trying to set up web.py on Dreamhost using this guide:
Web.py - Dreamhost Wiki
My problem is that many pages on this topic refers to fcgi.py and links to a svn repository that no longer exists. So I got flup instead, and I can run
import web
from flup.server import fcgi
without errors in Python, but not import fcgi
The flup.server version of fcgi can't stand alone, so I can't simply copy the one file somewhere into the PYTHONPATH.
When I try open index.py 500 Internal server error. I tried to check out the logs, but they are note very useful - all I get there is "GET / HTTP/1.1" 200.
I have run out of ideas how to debug this thing.

Categories

Resources