Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

KeyError thrown in getProjectIDByNode #149

Open
Assignees
@elapfra

Description

Hi,

Thanks for this library, it works great.

However, I encounter this error while running "TestLinkExample.py"

Traceback (most recent call last):
 File "/home/elapfra/code/TestLink-API-Python-client/example/TestLinkExample.py", line 713, in <module>
 response = myTestLink.copyTCnewVersion(newTestCaseID_B, 
 File "/home/elapfra/code/TestLink-API-Python-client/src/testlink/testlinkapi.py", line 188, in copyTCnewVersion
 return self._copyTC(origTestCaseId, changedAttributes, origVersion, 
 File "/home/elapfra/code/TestLink-API-Python-client/src/testlink/testlinkapi.py", line 258, in _copyTC
 origArgItems['testprojectid'] = self.getProjectIDByNode(origTestCaseId)
 File "/home/elapfra/code/TestLink-API-Python-client/src/testlink/testlinkapi.py", line 166, in getProjectIDByNode
 node_path = self.getFullPath(int(a_nodeid))[a_nodeid]
KeyError: 563

It seems to me the dict should be accessed by string.
This works.
node_path = self.getFullPath(int(a_nodeid))[str(a_nodeid)]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /