Opened 16 years ago

Last modified 15 years ago

#3443 closed defect

ticket.get() requires a float — at Version 1

Reported by: anonymous Owned by: Alec Thomas
Priority: normal Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Alec Thomas)

When I use the following pyscript with XML-RPC, I get the error

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 2: "'a float is required' while executing 'ticket.get()'">

here is the pyscript

#! /usr/bin/env python

import xmlrpclib
import sys

if len(sys.argv)!=3:
        sys.exit("Must provide server and ticket id number.")

server=xmlrpclib.ServerProxy(sys.argv[1])
print server.ticket.get(float(sys.argv[2]))

Change History (1)

comment:1 Changed 16 years ago by Alec Thomas

Description: modified (diff)
Note: See TracTickets for help on using tickets.