id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
871,ticket.get appears to die on ticket custom fields,greg@max-t.com,osimons,When trying to use ticket.get() against my trac installation I get a TypeError exception from dump_struct in xmlrpclib.py due to the type of one of my custom fields not being string. They are_ in fact type 'unicode' so I'm not really sure if they are wrong or the plugin is wrong but either way it doesn't seem to work. This was also posted to the trac mailing list.\r\n\r\n{{{\r\nSorry to respond to my own post but I've been debugging this a bit and\r\nhave more of an idea of what is going on.\r\n\r\nI played around with the exception handling in xmlrpclib.py. It turns\r\nout the TypeError exception gets thrown on one of my custom ticket\r\nfields. The field is defined in trac.ini as:\r\n\r\nverified = checkbox\r\nverified.label = Fix Verified\r\nverified.value = 0\r\nverified.order = 7\r\n\r\nand the type is somehow unicode. I have a few other checkbox custom\r\nfields and if they are processed in order then they are all fine. This\r\nis the same field I had problems with in ticket #3939 so now I'm\r\nwondering if there is just something dodgy with that field. \r\n\r\nAnyone have an idea of how to track this down?\r\n\r\nThanks_\r\nGreg\r\n\r\n\r\nOn Sat_ 2006-11-04 at 18:23 -0500_ Greg Dickie wrote:\r\n> Hi_\r\n> \r\n>   Sorry in advance if this is a FAQ but I'm an xmlrpc virgin ;-). I want\r\n> to use xmlrpc to create tickets a part of a merge review process but I\r\n> can't even get the examples to work right ;-). This is trac 0.10 and\r\n> using the example:\r\n> \r\n> import xmlrpclib\r\n> \r\n> server = xmlrpclib.ServerProxy("http://trac/Sledgehammer/xmlrpc")\r\n> \r\n> multicall = xmlrpclib.MultiCall(server)\r\n> for ticket in server.ticket.query("owner=greg"):\r\n>     multicall.ticket.get(ticket)\r\n> print map(str_ multicall())\r\n> \r\n> \r\n> gives this:\r\n> \r\n> Traceback (most recent call last):\r\n>   File "tt"_ line 8_ in ?\r\n>     print map(str_ multicall())\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 945_ in __call__\r\n>     return\r\n> MultiCallIterator(self.__server.system.multicall(marshalled_list))\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 1096_ in __call__\r\n>     return self.__send(self.__name_ args)\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 1383_ in __request\r\n>     verbose=self.__verbose\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 1147_ in request\r\n>     return self._parse_response(h.getfile()_ sock)\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 1286_ in _parse_response\r\n>     return u.close()\r\n>   File "/usr/lib/python2.4/xmlrpclib.py"_ line 744_ in close\r\n>     raise Fault(**self._stack[0])\r\n> xmlrpclib.Fault: <Fault 2: "'dictionary key must be string' while\r\n> executing 'system.multicall()'">\r\n> \r\n> \r\n> which seems to be to be a problem in the data being received.\r\n> \r\n> Anyone know what I'm doing wrong?\r\n> \r\n> Thanks_\r\n> Greg\r\n> \r\n\r\n}}}\r\n\r\nThanks_\r\nGreg,defect,closed,normal,XmlRpcPlugin,blocker,worksforme,,thijs,0.10
