Modify

Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#723 closed defect (fixed)

search.performSearch raises fails to marshal Markup objects

Reported by: Michael Granger Owned by: Alec Thomas
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords: xmlrpc search performSearch faultexception
Cc: Trac Release: 0.10

Description

When I call search.performSearch:

tracclient.search.performSearch( 'ldap', ['ticket'] )

I get a FaultException back. Looking in the log, it seems the search results contain trac.util.html.Markup objects, which aren't marshallable:

2006-09-18 09:41:10,237 Trac[api] DEBUG: ('SEARCH_VIEW', ((<type 'list'>, <type 'str'>), (<type 'list'>, <type 'str'>, <type 'list'>)), <bound method SearchRPC.performSearch of <tracrpc.search.SearchRPC object at 0x89d566c>>)
2006-09-18 09:41:10,238 Trac[search] DEBUG: Searching with ['ticket']
2006-09-18 09:41:10,288 Trac[web_ui] ERROR: cannot marshal <class 'trac.util.html.Markup'> objects
2006-09-18 09:41:10,290 Trac[web_ui] ERROR: Traceback (most recent call last):
  File "build/bdist.freebsd-6.1-RELEASE-i386/egg/tracrpc/web_ui.py", line 58, in process_request
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 1029, in dumps
    data = m.dumps(params)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 603, in dumps
    dump(v, write)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 615, in __dump
    f(self, value, write)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 675, in dump_array
    dump(v, write)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 615, in __dump
    f(self, value, write)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 675, in dump_array
    dump(v, write)
  File "/usr/local/lib/python2.4/xmlrpclib.py", line 613, in __dump
    raise TypeError, "cannot marshal %s objects" % type(value)
TypeError: cannot marshal <class 'trac.util.html.Markup'> objects

I'm using [1276] with Trac [T3747].

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by Alec Thomas

Resolution: fixed
Status: newclosed

(In [1278]) * Added system.getAPIVersion(). Returns a two element tuple containing the Trac XML-RPC version number. Closes #652 (refer to this ticket for semantics).

  • Added ticket.getTicketFields(). Forwards directly to TicketSystem().get_ticket_fields(). Closes #651.
  • Fixed #723.

comment:2 Changed 6 years ago by anonymous

Type: defectenhancement

comment:3 Changed 6 years ago by anonymous

Type: enhancementdefect

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Alec Thomas.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.