Hi all, I'm writing using Flask, Python 2.7.11, Sqlalchemy 1.0.11 and Postgresql 9.4.6 to write a web application but I keep getting this error when I try to access the database. First, my config file:
import os basedir = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'chara' WTF_CSRF_ENABLED = True WTF_CSRF_SECRET_KEY = 'csrf-chara' LDAP_PROTOCOL_VERSION = 3 AD_PROVIDER_URL = 'ldap://ad.uillinois.edu:389/' AD_BASE_DN = 'cn=%s,OU=People,DC=ad,DC=uillinois,DC=edu' LDAP_PROVIDER_URL = 'ldap://ldap.illinois.edu:389' LDAP_BASE_DN = 'OU=People,DC=uiuc,DC=edu' #if os.environ.get('DATABASE_URL') is None: # SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db') #else: SQLALCHEMY_DATABASE_URI = 'postgres://erdwvldwaunpri:a9enrwrdx_zr9ptmamzs3bn...@ec2-54-227-245-197.compute-1.amazonaws.com:5432/dauoltmmkkfj08' SQLALCHEMY_MIGRATE_REPO = os.path.join(basedir, 'db_repository') SQLALCHEMY_TRACK_MODIFICATIONS = True Then, I create my database ORM style: #!flask/bin/python from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy from flask_login import LoginManager app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) login_manager = LoginManager() login_manager.init_app(app) login_manager.login_view = 'login' from app.auth.views import auth app.register_blueprint(auth) db.create_all() I can access the webpages and everything, but if I try to login or access the db I get the operational error. Can anyone help me with this? I've attached the full error file. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
error.rtf
Description: RTF file