My app is running on openshift and I’m not being able to load the database. These are my codes:
from sqlalchemy import Column, Integer, String,create_engine,ForeignKey,Time
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from classes import Team,Match,Channel,Country,Mapping
import json
app = Flask(__name__)
engine = create_engine('sqlite:///../data/euro2012tvguide.sqlite')
Session = sessionmaker(bind=engine)
session = Session()
In the file data, I’ve the file euro2012tvguide.sqlite which is the sqlite db
In fact the problem was that there was a problem with the path, it should have been like this
I obtained much help from the openshift forum, here is the link, https://openshift.redhat.com/community/forums/openshift/sqlalchemy-not-loading-sqlite-db