LOCALIZE: INSUFFICIENT_RIGHTS Code:2010 error python client

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

LOCALIZE: INSUFFICIENT_RIGHTS Code:2010 error python client

Postby josri » Sun Jun 14, 2009 9:44 pm

Hi,

I am new to testlink and I have come a long way, setting up everything from mysql, php, apache, testlink with the help of this forum...... :)
I am stuck with the api now :( Please help....

I get the error, "reportTCResult result was: [{'message': 'LOCALIZE: INSUFFICIENT_RIGHTS', 'code': 2010}]

Here is my python code:

#! /usr/bin/python

"""
Testlink API Sample Python Client implementation
"""
import xmlrpclib

class TestlinkAPIClient:

# substitute your server URL Here
SERVER_URL = "http://localhost:8080/testlink/lib/api/xmlrpc.php"

def __init__(self, devKey):
self.server = xmlrpclib.Server(self.SERVER_URL)
self.devKey = devKey

def getdevKey(self):
return self.devKey

def reportTCResult(self, tcid, tpid, buildid, status):
print tcid
print tpid
data = {"devKey":self.devKey, "testcaseid":tcid, "testplanid":tpid, "buildid":buildid, "status":status}
return self.server.tl.reportTCResult(data)

def getInfo(self):
return self.server.tl.about()

#client = TestlinkAPIClient()
client = TestlinkAPIClient("51f1257065e1721a8bc6aee7ec565530")
print client.getInfo()
result = client.reportTCResult(3,7,1,"p")
print "reportTCResult result was: %s" %(result)
josri
Advanced user
 
Posts: 30
Joined: Fri Jun 12, 2009 9:39 pm

Postby josri » Tue Jun 16, 2009 4:19 am

Ah! silly mistake, the locale on the users table for the user I was using had en_GB. Once I changed that, it worked!

Hope this helps someone...
josri
Advanced user
 
Posts: 30
Joined: Fri Jun 12, 2009 9:39 pm


Return to XML-RPC API



Who is online

Users browsing this forum: Google [Bot] and 1 guest