On Mon, Sep 29, 2008 at 6:17 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Now this is something I haven't seen, as long as there isn't any name >> collisions, which doesn't seem to be this should never happen. Could >> you make sure some extra files aren't been added, say an old .pyc or a >> copy made by an ide (or a backup) defining several times the same >> models? did you try running it outside ipython, maybe something is >> doing a strange thing there. > > Even worse, I just tried creating another project using elixir and > creating the same simple object and nothing else (no identity stuff): > > class Experiment(Entity): > name = Field(Unicode(30), primary_key=True) > desc = Field(UnicodeText) > > and this is the result: > >>>> Experiment(u'1', u'one') > Traceback (most recent call last): > File "<console>", line 1, in <module> > File "/usr/lib64/python2.5/site-packages/Elixir-0.6.1-py2.5.egg/ > elixir/entity.py", line 718, in __call__ > return type.__call__(cls, *args, **kwargs) > TypeError: __init__() takes exactly 1 argument (3 given)
The default __init__ method provided by Entity in Elixir accepts keyword arguments for field names, not plain arguments... Try: Experiment(name=u'1', desc=u'one') -- Gaƫtan de Menten http://openhex.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

