Hi Max,

fixed in r803. Thanks!

Cheers,
Simon

Max Ischenko wrote:
> Hello,
> 
> I've upgraded to r801 and my fastdata-based UI no longer works. When trying 
> to create new object (doing POST to ./create) I got this traceback:
> 
> 500 Internal error
> 
> The server encountered an unexpected condition which prevented it from 
> fulfilling the request.
> 
> Page handler: <function _wrapper at 0x0148DBF0>
> Traceback (most recent call last):
>   File 
> "c:\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py",
>  line 98, in _run
>     self.main()
>   File 
> "c:\python24\lib\site-packages\cherrypy-2.2.0beta-py2.4.egg\cherrypy\_cphttptools.py",
>  line 246, in main
>     body = page_handler(*virtual_path, **self.params)
>   File "d:\projects\3rd-party\turbogears\turbogears\identity\conditions.py", 
> line 271, in _wrapper
>     return fn( *args, **kw )
>   File "<string>", line 3, in create
>   File "d:\projects\3rd-party\turbogears\turbogears\controllers.py", line 
> 111, in validate
>     form_ = form(args[0])
> IndexError: tuple index out of range
> 
> URL: http://localhost:4001/.../create
> 
> After instrumenting controllers.py:validate function with print statements:
>             print 'ORIG', args, kw
>             args, kw = tg_util.to_kw(func, args, kw)
>             print 'FINAL', args, kw
>  I got this:
> ORIG (<spaca.controllers.UserSpacollManager object at 0x013E0470>,) 
> {'source_tit
> le': '', 'ext_id': '', 'language': 'eng', 'given_id': '', 'source_published': 
> '2
> 006/02/21 08:09', 'source_author': '', 'source_url': '', 'subtype': '', 
> 'name':
> 'ITUA.info'}
> FINAL () {'source_title': '', 'ext_id': '', 'language': 'eng', 'given_id': 
> '', '
> self': <spaca.controllers.UserSpacollManager object at 0x013E0470>, 
> 'source_publ
> ished': '2006/02/21 08:09', 'source_author': '', 'source_url': '', 'subtype': 
> ''
> , 'name': 'ITUA.info'}
> 
> Looks like the 'self' arg has gone while it shouldn't be. Looks like a bug in 
> to_kw function but I'm not sure.
> 
> If that may help, in my code I use custom DataController class that overrides 
> index/add methods but do not override create. Relevant excerpt:
> 
> 
> class BaseDashboardController(DataController, SecureResource):
>     require = not_anonymous()
> 
>     @turbogears.expose(template=".templates.manage_something")
>     def index(self, **params):
>         data, params = self.select_some(params)
>         return self.show_dynagrid(data, params, '')
> 
> 
>     @turbogears.expose()
>     def add(self):
>         return dict(tg_template=self.form_template,
>             navform=self.navform, navbase='',
>             title=self.create_page_title,
>             obj=None, form=self.form_widget, action="create")
>     add.expose_container = True
> 
> 
> 
> 
> 

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to