Ticket #594 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Error: Macro Poll(Test?; a; b) failed

Reported by: dev Assigned to: athomas
Priority: normal Component: PollMacro
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

I tried PollMacro on my trac installation (current trunk) and tried the example from the wiki page. But I get only this error:

Error: Macro Poll(Test?; a; b) failed

keys

Attachments

Change History

08/14/06 09:20:35 changed by nextime@nexlab.it

Same here ( trac 0.9.6 )

08/18/06 00:32:20 changed by robert@broofa.com

I've figured out the problem. This tracpoll.py code:

        self.votes.update([(k[0], []) for k in self.vote_defs
                           if k[0] not in self.votes])

... is relying on the Python 2.4 implementation of update(). The Python 2.3 version of update() doesn't take an array of tuples as an argument and throws the AttributeError?. (This API change is documented in note #9 in http://docs.python.org/lib/typesmapping.html)

The solution is to change the above to:

        self.votes.update(dict([(k[0], []) for k in self.vote_defs
                           if k[0] not in self.votes]))

Which only leaves the question of how best to get this change back into the code?

(stacktrace of this bug available in the closed duplicate, #616)

08/18/06 03:43:15 changed by athomas

  • status changed from new to assigned.

Thanks for chasing this down. I'll commit the fix over the weekend.

08/19/06 00:29:28 changed by athomas

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [1155]) Committed fix for Python 2.3, from robert@broofa.com. Closes #594.


Add/Change #594 (Error: Macro Poll(Test?; a; b) failed)




Change Properties
Action