Yep. That was it. Stupid me...

On Nov 13, 4:10 pm, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Nov 13, 2007, at 8:25 AM, Koen Bok wrote:
>
> > Hi, I have this strange bug or problem...
>
> > I have a basic class like this mapped to a table with the same name.
> > Metatype is a relation to the metatype object.
>
> > class MetaData(DBObject):
>
> >    def __init__(self, metatype, value, item):
>
> >            self.metatype = metatype
> >            self.item = item
> >            self.value = value
>
> > class MetaType(DBObject):
>
> >    def __init__(self, name, parent=None, offset=None):
>
> >            self.parent = parent
> >            self.offset = offset
> >            self.name = name
>
> > Now when I create a MetaData object like this I get the following
> > error:
>
> >>>> nameMetaType = MetaType('name')
> >>>> product = Product(Decimal('20.00'), Decimal('15.00'))
> >>>> Session.commit()
>
> >>>> MetaData(nameMetaType, 'Koen', product)
>
> > Traceback (most recent call last):
> >  method testMetabug in test_connection.py at line 16
> >    MetaData(nameMetaType, 'Koen', product)
> >  method init in attributes.py at line 1025
> >    oldinit(instance, *args, **kwargs)
> > TypeError: __init__() takes at most 3 arguments (4 given)
>
> what happens if you change the name "MetaData" to something else ?  
> your error below seems to indicate that your MetaData class/object is  
> getting treated like a SQLAlchemy "MetaData" object.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to