On Oct 13, 3:08 pm, laurentA <[email protected]> wrote:
> I seem to have this problem with every Javascript http request to my
> server.
>
> Does anyone have any idea what I did wrong?
>
> I made a new virtualenv with 2.0.3, and copied my application's
> directory from it's 2.0rc1 virtualenv to the new one.
> Please note that the exact same code works under 2.0rc1...
> If you need more info, just ask.
>
> Thanks for your help!
>

[snip]

> File '/home/tg2env_manual_2.0.3/lib/python2.5/site-packages/
> TurboGears2-2.0.3-py2.5.egg/tg/controllers.py', line 170 in
> _perform_call
>   remainder[i] = params[name]
> TypeError: 'tuple' object does not support item assignment
>
> and indeed, remainder is equal to  (u'user_uid', u'm')

Are you using a lookup method as described in
http://www.turbogears.org/2.0/docs/main/TGControllers.html#the-lookup-method

class BlogController(BaseController):

   @expose()
   def lookup(self, year, month, day, id, *remainder):
      dt = date(int(year), int(month), int(day))
      blog_entry = BlogEntryController(dt, int(id))
      return blog_entry, remainder

If so, try changing your return statement to something like:

      return blog_entry, list(remainder)

Hope that helps,

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

Reply via email to