Modify

Opened 8 years ago

Closed 8 years ago

Last modified 3 years ago

#723 closed defect (fixed)

search.performSearch raises fails to marshal Markup objects

Reported by: ged Owned by: athomas
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 8 years ago by athomas

  • Resolution set to fixed
  • Status changed from new to closed

(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 3 years ago by anonymous

  • Type changed from defect to enhancement

comment:3 Changed 3 years ago by anonymous

  • Type changed from enhancement to defect

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from athomas. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.