mitsuhiko/flask-sqlalchemy — Issue #63: drivername not found or defined
Author: satyen
Created: 2011-11-27 19:10:36+00:00
State: open

I don't know if this is a config issue or a bug at this point.
Flast-SQLAlchemy is used as part of mead project.

** My setup is in a virtual environment:

** python version
(mead_dev)seth@dharma:~/Code/python/mead_dev/mead$ python -V
Python 2.7.2+

** Please take a look at the stack dump below. Object name seem not to be defined.
Looked @ the code and don't have much context.

_EngineConnector.get_uri() does some binding, which fails to be defined properly and is not 'sane'.
Hence an invalid uri is returned. Also digging further it seems that the binding to a db-engine is not defined. So maybe this is a config issues?

** Maybe you can shed some light on this?

[stack trace]
(mead_dev)seth@dharma:~/Code/python/mead_dev/mead$ ./run_server.py
Traceback (most recent call last):
File "./run_server.py", line 4, in
from mead import app
File "/home/seth/Code/python/mead_dev/mead/mead/__init__.py", line 66, in
import mead.core.views.content
File "/home/seth/Code/python/mead_dev/mead/mead/core/views/content.py", line 10, in
from available import defaults
File "/home/seth/Code/python/mead_dev/mead/mead/core/views/available.py", line 22, in
defaults.update(dict(pages = Page.query.all()))
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 386, in __get__
return type.query_class(mapper, session=self.sa.session())
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/SQLAlchemy-0.7.3-py2.7.egg/sqlalchemy/orm/scoping.py", line 53, in __call__
return self.registry()
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/SQLAlchemy-0.7.3-py2.7.egg/sqlalchemy/util/_collections.py", line 877, in __call__
val = self.registry.value = self.createfunc()
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 191, in __init__
bind=db.engine,
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 719, in engine
return self.get_engine(self.get_app())
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 736, in get_engine
return connector.get_engine()
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 428, in get_engine
self._sa.apply_driver_hacks(self._app, info, options)
File "/home/seth/Code/python/mead_dev/local/lib/python2.7/site-packages/Flask_SQLAlchemy-0.15-py2.7.egg/flaskext/sqlalchemy.py", line 679, in apply_driver_hacks
if info.drivername == 'mysql':
AttributeError: 'NoneType' object has no attribute 'drivername'