Hi,
I am trying to install TurboGears 2.0 with mysql support, I followed
the quickstart guide and made this change in development.ini:
<< sqlalchemy.url = sqlite:///%(here)s/devdata.db
>> sqlalchemy.url=mysql://user:passw...@localhost/foo
My mysql server is running and I'm able to log in with phpmyadmin
using these credentials.
The problem I have is that SQLAlchemy doesn't create the tables when I
try to setup the app:
$ paster setup-app development.ini
Creating tables
19:28:44,866 INFO [sqlalchemy.engine.base.Engine.0x...852c] SHOW
VARIABLES LIKE 'sql_mode'
19:28:44,866 INFO [sqlalchemy.engine.base.Engine.0x...852c] ()
19:28:44,867 INFO [sqlalchemy.engine.base.Engine.0x...852c] DESCRIBE
`tg_group`
19:28:44,867 INFO [sqlalchemy.engine.base.Engine.0x...852c] ()
19:28:44,868 INFO [sqlalchemy.engine.base.Engine.0x...852c] ROLLBACK
Traceback (most recent call last):
File "/home/prm/svn/pos/tg2env/bin/paster", line 8, in <module>
load_entry_point('PasteScript==1.7.3', 'console_scripts', 'paster')
()
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 84, in run
invoke(command, command_name, options, args[1:])
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 123, in
invoke
exit_code = runner.run(args)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/appinstall.py", line 68, in
run
return super(AbstractInstallCommand, self).run(new_args)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/command.py", line 218, in run
result = self.command()
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/appinstall.py", line 456, in
command
self, config_file, section, self.sysconfig_install_vars
(installer))
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/appinstall.py", line 598, in
setup_config
mod.setup_app, command, filename, section, vars)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
PasteScript-1.7.3-py2.5.egg/paste/script/appinstall.py", line 612, in
_call_setup_app
func(command, conf, vars)
File "/home/prm/svn/pos/foo/foo/websetup.py", line 22, in setup_app
model.metadata.create_all(bind=config
['pylons.app_globals'].sa_engine)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/schema.py", line 1765, in
create_all
bind.create(self, checkfirst=checkfirst, tables=tables)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 1129, in
create
self._run_visitor(self.dialect.schemagenerator, entity,
connection=connection, **kwargs)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 1158, in
_run_visitor
visitorcallable(self.dialect, conn, **kwargs).traverse(element)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/sql/visitors.py", line 89, in
traverse
return traverse(obj, self.__traverse_options__,
self._visitor_dict)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/sql/visitors.py", line 200, in
traverse
return traverse_using(iterate(obj, opts), obj, visitors)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/sql/visitors.py", line 194, in
traverse_using
meth(target)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/sql/compiler.py", line 795, in
visit_metadata
collection = [t for t in sql_util.sort_tables(tables) if
self._can_create(t)]
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/sql/compiler.py", line 788, in
_can_create
return not self.checkfirst or not self.dialect.has_table
(self.connection, table.name, schema=table.schema)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/databases/mysql.py", line 1607,
in has_table
rs = connection.execute(st)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 824, in
execute
return Connection.executors[c](self, object, multiparams, params)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 888, in
_execute_text
return self.__execute_context(context)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 896, in
__execute_context
self._cursor_execute(context.cursor, context.statement,
context.parameters[0], context=context)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 950, in
_cursor_execute
self._handle_dbapi_exception(e, statement, parameters, cursor,
context)
File "/home/prm/svn/pos/tg2env/lib/python2.5/site-packages/
SQLAlchemy-0.5.1-py2.5.egg/sqlalchemy/engine/base.py", line 931, in
_handle_dbapi_exception
raise exc.DBAPIError.instance(statement, parameters, e,
connection_invalidated=is_disconnect)
sqlalchemy.exc.ProgrammingError: (ProgrammingError) (1146, "Table
'pos_dev.tg_group' doesn't exist") 'DESCRIBE `tg_group`' ()
Does anybody know what I'm doing wrong? I examined the metadata
structure with pdb right before the create_all command and it looks
like all the tables are there.
Thanks for your help.
-Patrick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---