Pradeep0308
asked on
Python Assistance
Hi Guys,
I have the below python script:
data = siWfc.getWFContent("proces sString")
node = siWfc.getWFContent("proces sNode")
try:
if len(data) > 0:
parms = data.split('&')
for p in parms:
nv = p.split('=',1)
siWfc.setWFContent(node + "/" + nv[0],nv[1],1)
except AttributeError:
siWfc.setBasicStatus(siWfc .SUCCESS)
except TypeError:
siWfc.setBasicStatus(siWfc .SUCCESS)
If below is passed to it as input:
1st Input:
<processNode>NOTIFY_PARMS< /processNo de>
<processString>ADDRESS</pr ocessStrin g>
2nd Input:
<processNode>NOTIFY_PARMS< /processNo de>
<processString>Notificatio nRule/ADDR ESS</proce ssString>
Both fail with the error:
exception from Jython: Traceback (innermost last): File "<string>", line 8, in ? IndexError: index out of range: 1
Can someone assist and tell me what the issue is?
Regards
Pradeep
I have the below python script:
data = siWfc.getWFContent("proces
node = siWfc.getWFContent("proces
try:
if len(data) > 0:
parms = data.split('&')
for p in parms:
nv = p.split('=',1)
siWfc.setWFContent(node + "/" + nv[0],nv[1],1)
except AttributeError:
siWfc.setBasicStatus(siWfc
except TypeError:
siWfc.setBasicStatus(siWfc
If below is passed to it as input:
1st Input:
<processNode>NOTIFY_PARMS<
<processString>ADDRESS</pr
2nd Input:
<processNode>NOTIFY_PARMS<
<processString>Notificatio
Both fail with the error:
exception from Jython: Traceback (innermost last): File "<string>", line 8, in ? IndexError: index out of range: 1
Can someone assist and tell me what the issue is?
Regards
Pradeep
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks. Do you know why the above code is causing General Protection Fault.?
What does this have to do with Java exactly?
@CEHJ: Jython is Python implementation in Java. This way, and assuming that Pradeep may be a beginner in Python, and possibly the used library is written in Java, the Java tag is reasonable.
@Pradeep:
I do not know. But this is not usual bug in Python. It seems to be the bug in the library you use.
@Pradeep:
Do you know why the above code is causing General Protection Fault?
I do not know. But this is not usual bug in Python. It seems to be the bug in the library you use.
Is it Jython Pradeep0308?
@CEHJ: See the error message.
ASKER