Re: Errors with SqlSoup

Rui Coelho Justino <[email protected]> Sun, 27 Aug 2006 22:01:50 +0100
Newsgroups gmane.comp.python.spyce.general
Organization rs
Message-ID <[email protected]>
Hello all,

First let me say that I like very much SPYCE, it's a very big pleasure to work 
with it and this second release is even better.

Hope to contribute something to this discussion. Here is my error, and I can 
say that I have SPYCE, Sqlalchemy and Psycopg2 working.

> On Sat, 26 Aug 2006 00:01:47 -0400, "Dustin" <[email protected]> said:

> > it results in the following error:
> >
> > [Fri Aug 25 23:58:35 2006] [error] PythonHandler
> > run_spyceModpy::spyceMain: InvalidRequestError: Cant get DBAPI module for
> > dialect '<sqlalchemy.databases.postgres.PGDialect object at 0x1133a44c>'

The error that it gives me is:
-----
Spyce exception
File: /home/user/project/login/x/index.spy
Message:  
ArgumentError: Could not assemble any primary key columns for mapped 
table 'users'
Stack:  build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py:327, in 
_compile_tables:
None
build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py:191, in _do_compile:
None
build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py:158, in compile:
None
build/bdist.linux-x86_64/egg/sqlalchemy/orm/query.py:19, in __init__:
None
build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py:1060, in query:
None
build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py:1094, in select:
None
index.spy:37, in (main):
rp = db.users.select()
/usr/share/spyce/spyce.py:464, in spyceProcess:
try: return self.process(*args, **kwargs)
-----

Using in spyceconf.py:

  globals['db'] = SqlSoup('postgres://sss:aaa@localhost/db')

If i use it like this:

  globals['db'] = sqlalchemy.BoundMetaData('postgres://sss:aaa@localhost/db')

And in the scripts call:
  spyceConfig.sqlalchemy.Table('users', db, autoload=True)

It works fine.

rcj.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Spyce-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spyce-users
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQBE8ghNA6VieAGtk/YRAqS1AKDTRf2kCk4RLoCl7A3uiZtRAHEC2QCfUgrh
uSwnHHTZ9zQzl0Tt7CwY33c=
=7cHX
-----END PGP SIGNATURE-----