Ok, I setup my database engine connection in the config file like so:
http://www.bitbucket.org/metaperl/gnumatrix/src/tip/gnumatrix/conf/gnumatrix.cfg
[database]
activated = on
uri = sqlite:///$here/../data/gnumatrix.db
metadata = gnumatrix.models:__metadata__
debug = on
And now I am trying to create my actual database, which is in
models.py:
http://www.bitbucket.org/metaperl/gnumatrix/src/8c6318125e08/gnumatrix/gnumatrix/models.py
But I am getting an error:
Python 2.5.2 Stackless 3.1b3 060516 (release25-maint, Oct 1 2008,
19:33:07)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from models import *
>>> setup_all()
>>> create_all()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "__init__.py", line 99, in create_all
File "/home/Administrator/prg/nagare-home/lib/python2.5/site-
packages/SQLAlchemy-0.4.6-py2.5.egg/sqlalchemy/schema.py", line 1579,
in create_all
bind = _bind_or_error(self)
File "/home/Administrator/prg/nagare-home/lib/python2.5/site-
packages/SQLAlchemy-0.4.6-py2.5.egg/sqlalchemy/schema.py", line 1960,
in _bind_or_error
raise exceptions.UnboundExecutionError(msg)
sqlalchemy.exceptions.UnboundExecutionError: The MetaData is not bound
to an Engine or Connection. Execution can not proceed without a
database to execute against. Either execute with an explicit
connection or assign the MetaData's .bind to enable implicit
execution.
>>>