On Dec 15, 2011, at 2:38 AM, useher wrote:
> I write a library with some classes that has to bundle function for
> different applications accessing data on a PostgreSQL-9.x Server.
> sqlalchemy is installed and maintained by easy_install not by
> packetmanagement. After upgrading to 0.7.4 the following error occurs:
>
> File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py", line
> 1481, in _should_exclude
> File "build/bdist.linux-x86_64/egg/sqlalchemy/orm/mapper.py", line
> 1458, in _is_userland_descriptor
> TypeError: Error when calling the metaclass bases
> issubclass() arg 1 must be a class
I need to see what "arg" actually is here - you'll note the SQLAlchemy code in
question isn't calling issubclass(), it's calling isinstance(). It suggests
that SQLA's invocation of the descriptor itself is resulting in an issubclass()
call, though when I try to simulate this error the stack trace is explicit:
File "/Users/classic/dev/sqlalchemy/lib/sqlalchemy/orm/mapper.py", line 1458,
in _is_userland_descriptor
isinstance(obj.__get__(None, obj),
File "test.py", line 9, in __get__
if issubclass(owner, object):
TypeError: Error when calling the metaclass bases
issubclass() arg 1 must be a class
so not sure why the actual source of issubclass() is not present in your stack
trace.
Can you just pdb into that section using pdb.post_mortem() and figure out what
the descriptor in question is actually doing ? I'd like to understand what's
going on before just putting in a blunt "except:".
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en.