Hi,
I tried to run the db_create.py to create the tables but encountered an error.
03:38 ~/mysite (master)$ python db_create.py
Traceback (most recent call last):
File "db_create.py", line 4, in <module>
db.create_all()
File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy.py", line 822, in create_all
self._execute_for_all_tables(app, bind, 'create_all')
File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy.py", line 814, in _execute_for_all_tables
op(bind=self.get_engine(app, bind), tables=tables)
File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy.py", line 763, in get_engine
return connector.get_engine()
File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy.py", line 438, in get_engine
self._sa.apply_driver_hacks(self._app, info, options)
File "/usr/local/lib/python2.7/dist-packages/flask_sqlalchemy.py", line 706, in apply_driver_hacks
if info.drivername == 'mysql':
AttributeError: 'NoneType' object has no attribute 'drivername'
My mysqlconnection:
os.environ['DATABASE_URL'] = "mysql+mysqldb://coinage:mypassword:@coinage.mysql.pythonanywhere- services.com/coinage$sampledb, pool_recycle=280"
Any inputs are much appreciated.
Thanks.