[NOT AN ISSUE] KeyError for testlink project name

Discussion and information for XML-RPC interface.

Moderators: Amaradana, TurboPT, TL Developers

[NOT AN ISSUE] KeyError for testlink project name

Postby vdanny » Mon Aug 18, 2014 11:16 pm

Earlier I was using testlink 1.9.5 and now it is updated to 1.9.11. In one of script test project names is fetched with following code:

[x for x in testLinkServer.tl.getProjects(testLinkArgs) if x['name']== 'Projec_Name'][0]['id']

This code was working with 1.9.5 but with 1.9.11 I am getting error: KeyError: 'name'

Any help to resolve this issue on 1.9.11 will be highly appreciated.

TIA.
vdanny
TestLink user
 
Posts: 5
Joined: Sat Sep 07, 2013 5:15 pm

Re: KeyError for testlink project name

Postby fman » Tue Aug 19, 2014 7:35 am

probably return data type has been changed.
I suggest to try with our PHP sample client and then change your implementation
fman
Member of TestLink Community
 
Posts: 3014
Joined: Tue Nov 15, 2005 7:19 am

Re: KeyError for testlink project name

Postby vdanny » Tue Aug 19, 2014 10:01 pm

fman wrote:probably return data type has been changed.
I suggest to try with our PHP sample client and then change your implementation


I tried to run sample clientGetProjects.py and in the received response I can see that 'name' is still a valid return type.
vdanny
TestLink user
 
Posts: 5
Joined: Sat Sep 07, 2013 5:15 pm

Re: KeyError for testlink project name

Postby fman » Wed Aug 20, 2014 8:39 am

Unfortunately I'm not able to understand what your last post means.
1. Issue is still there ?
2. ONLY clients that are updated are PHP, other examples provided with distribution can be updated.
fman
Member of TestLink Community
 
Posts: 3014
Joined: Tue Nov 15, 2005 7:19 am

Re: KeyError for testlink project name

Postby vdanny » Wed Aug 20, 2014 3:35 pm

Yes Issue is still there.
I used the clientGetProjects.py to get the details of testlink projects. Received response is

[{'opt': {'requirementsEnabled': 1, 'testPriorityEnabled': 1, 'automationEnabled': 1, 'inventoryEnabled': 1}, 'prefix': 'my_Prefix', 'name': 'my_Project', 'color': '', 'notes': '<p>\n\t&nbsp;project description</p>',.....}]

Here key 'name' is available in project details. My expectation is when I am using this key in a query, it should work fine. But I am receiving KeyError instead.
vdanny
TestLink user
 
Posts: 5
Joined: Sat Sep 07, 2013 5:15 pm

Re: KeyError for testlink project name

Postby fman » Wed Aug 20, 2014 6:36 pm

>> My expectation is when I am using this key in a query, it should work fine
SQL Query ?
against what table ?
fman
Member of TestLink Community
 
Posts: 3014
Joined: Tue Nov 15, 2005 7:19 am

Re: KeyError for testlink project name

Postby vdanny » Wed Aug 20, 2014 8:20 pm

Found issue in python script.
Thanks for you valuable time and support.
vdanny
TestLink user
 
Posts: 5
Joined: Sat Sep 07, 2013 5:15 pm


Return to XML-RPC API



Who is online

Users browsing this forum: No registered users and 1 guest