Hi Michael, In the svn trunk it works > I would advise to get the latest SVN trunk and see if that works, > someone else is having good results with it right now. also if its > possible to test your code with a different DB (like sqlite) to > establish that its an oracle-only problem.
engine = create_engine('oracle://dsn=orcl&user=asdf&password=asdf') foo = Table('foo', engine, Column('id', Integer, Sequence('foo_seq'), primary_key=True), Column('asdf', String(255))) class Foo(object): pass Foo.mapper = mapper(Foo, foo) Foo.mapper.get_by_asdf('asdf') #fails same error Foo.mapper.get_by(asdf='asdf') #fails same error Foo.mapper.selectone(foo.c.asdf=='asdf') #fails same error Foo.mapper.select(foo.c.asdf=='asdf') #ok > finally, if you can give me a full test program (I notice youre doing > a get_by_name in there) i will run it as soon as I get back to where > my Oracle server is. Kind Regards, Florian > On Mar 7, 2006, at 1:50 PM, Florian Boesch wrote: > > > Hi, > > > > I've got a problem since 0.1.3 that didn't exist in 0.1.2, the > > problem is: > > > > File "/home/florian/shop_ng/shop/shop/controllers.py", line 16, in > > __getattr__ > > config = orm.Mandator.mapper.get_by_name(name) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/mapping/mapper.py", > > line 425, in foo > > return self.get_by(**{key:arg}) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/mapping/mapper.py", > > line 355, in get_by > > x = self.select_whereclause(self._by_clause(*args, **params), > > limit=1) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/mapping/mapper.py", > > line 457, in select_whereclause > > return self._select_statement(statement, params=params) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/mapping/mapper.py", > > line 477, in _select_statement > > return self.instances(statement.execute(**params), **kwargs) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 397, in execute > > c = self.compile(e, parameters=bindparams) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 383, in compile > > return engine.compile(self, parameters=parameters, > > typemap=typemap) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/engine.py", > > line 316, in compile > > statement.accept_visitor(compiler) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 1262, in accept_visitor > > visitor.visit_select(self) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/databases/oracle.py", > > line 225, in visit_select > > limitselect.accept_visitor(self) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 1255, in accept_visitor > > f.accept_visitor(visitor) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 1262, in accept_visitor > > visitor.visit_select(self) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/databases/oracle.py", > > line 208, in visit_select > > ansisql.ANSICompiler.visit_select(self, select) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/ansisql.py", > > line 253, in visit_select > > l.accept_visitor(self) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 941, in accept_visitor > > self.obj.accept_visitor(visitor) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/sql.py", > > line 962, in accept_visitor > > visitor.visit_column(self) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/databases/oracle.py", > > line 176, in visit_column > > return ansisql.ANSICompiler.visit_column(self, column) > > File > > "/usr/local/lib/python2.4/site-packages/SQLAlchemy-0.1.3-py2.4.egg/ > > sqlalchemy/ansisql.py", > > line 158, in visit_column > > self.strings[column] = "%s.%s" % (column.table.name, column.name) > > AttributeError: 'NoneType' object has no attribute 'name' > > > > Mandator here beeing a very simple table as in: > > > > mandator = Table('mandator', engine, > > Column('id', Integer, Sequence('mandator_seq'), primary_key=True), > > Column('name', String(255)) > > ) > > > > and the mapper as in > > > > class Mandator(object): pass > > Mandator.mapper = mapper(Mandator, model.mandator) > > > > Any ideas? > > > > On a sidenote, a fully functional enterprise oracle is avaible for > > free as in > > beer if you can agree on using it in development only. > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by xPML, a groundbreaking scripting > > language > > that extends applications into web and mobile media. Attend the > > live webcast > > and join the prime developer group breaking into this new coding > > territory! > > http://sel.as-us.falkag.net/sel? > > cmd=lnk&kid=110944&bid=241720&dat=121642 > > _______________________________________________ > > Sqlalchemy-users mailing list > > Sqlalchemy-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Sqlalchemy-users mailing list > Sqlalchemy-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ Sqlalchemy-users mailing list Sqlalchemy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users