Skip to main content
4-Participant
July 7, 2023
Question

im issue CLI command string works in cmd line not with Python sub process

Hi Team,

 

 

Following im issue CLI command string works in cmd line not with Python sub process :

CLI Command works in CMDLine:
im issues --queryDefinition='((field["Project"]="/L2H0090") and (field["Document ID"]="11601660") and (field["Status_fld"]="reviewed","released","approved") and (field["Category"]="Software Test") and (field["External ID"]contains"Fully_Automated"))'

 

 

import subprocess

string = "im issues --queryDefinition="+'((field["Project"]="/L2H0090") and (field["Document ID"]="11601660") and (field["Status_fld"]="reviewed","released","approved") and (field["Category"]="Software Test") and (field["External ID"]contains"Fully_Automated"))'
try:
 result = subprocess.check_output(string)
 print(result)
except subprocess.CalledProcessError as e:
 print(e.output)

 

 

 

Its showing below error:

 

 

 

*** The query and queryDefinition options are incompatible with an issue selection.

 

 

 

Please support here to get correct command string which shall work in python as well.

Thanks in advance.

 

1 reply

24-Ruby IV
July 8, 2023

Article - "How to define a "query definition" that contains a field with spaces via CLI in Windchill RV&S": https://www.ptc.com/en/support/article/CS153138

Translate