On Thu, Oct 30, 2008 at 5:10 AM, velappan velappan <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I have upgraded my trac to 0.10 to 0.11.2  am getting error in this
> part of code when passing values to the Genshi template.
>
> The error I'm getting is :
> AttributeError: 'int' object has no attribute 'update'
>
> In this part it the error is happening:
>
>                       employee = {
>                                  'Username' : Username,
>                                  'Name' : Name,
>                                  'Email' : Email
>                                  }
>                       users.append(employee)
>                       users.sort()
>                       (self.log.debug('appaending users'))
>                       data['users'] =  users

A few things:  Assuming that users is a normal list, data is a normal
dictionary, and self is a Trac Component (whose ComponentManager is an
Environment) then nothing in this code is likely causing your
exception.  Nor does this part of the code do anything resembling
"passing values to [a] Genshi template".

And to make a couple other comments unrelated to this specific error:
That users.sort() is pointless because there's no meaningful way to
sort a list of dictionaries without at least providing a sort key.  I
believe there was at one point a total ordering for dicts, but it was
decided useless and was removed.  I'm also not sure why your
self.log.debug call is wrapped in parentheses.

If you post your full traceback it will probably be easier to get a
better answer.  If that error *is* in fact coming up while generating
the Genshi stream, you should be able to get the full traceback in
your Trac log at the very least, so make sure logging is enabled for
your test environment.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" 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/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to