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.
[NOT AN ISSUE] KeyError for testlink project name
Moderators: Amaradana, TurboPT, TL Developers
Re: KeyError for testlink project name
probably return data type has been changed.
I suggest to try with our PHP sample client and then change your implementation
I suggest to try with our PHP sample client and then change your implementation
Re: KeyError for testlink project name
I tried to run sample clientGetProjects.py and in the received response I can see that 'name' is still a valid return type.fman wrote:probably return data type has been changed.
I suggest to try with our PHP sample client and then change your implementation
Re: KeyError for testlink project name
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.
1. Issue is still there ?
2. ONLY clients that are updated are PHP, other examples provided with distribution can be updated.
Re: KeyError for testlink project name
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 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.
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 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.
Re: KeyError for testlink project name
>> My expectation is when I am using this key in a query, it should work fine
SQL Query ?
against what table ?
SQL Query ?
against what table ?
Re: KeyError for testlink project name
Found issue in python script.
Thanks for you valuable time and support.
Thanks for you valuable time and support.