Hi,
About the error message, please refer the document as below:
http://support.openview.hp.com/selfsolve/document/KM741105
For more information about scripting ALM/QC, you might need to reach out HP professional services to complete it.
Regards,
Chau Nguyen