All listers, I’m running python externally. I’m getting a
python error whenever an spss command in spss.Submit does not execute. For example, if there is no variable name ‘varx’
when the spss.Submit has a delete variables varx in it I get an spss error and
the command is not executed, but python also raises an error and does not
complete the rest of the spss.Submit. In the spss GUI I can include something like this and
it runs fine although it raises the error that there is not variable with this
name. I have the same issue if I try to create a variable that is already
there. SPSS raises an error and then python quits. I want to allow for the possibility that a variable has been
created already. I’d like to just be able to always include spss commands
to create it. But it seems that if I do that python quits, and if I try to
delete it first and it’s not there python quits. Is there a way around this? Am I making an error or is this
just how spss.Submit works in python. Thanks Matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 |
Submit stops on an error. You can use a try/except block to capture the exception and take appropriate action. From: "Pirritano, Matthew" [[hidden email]] All listers, I’m running python externally. I’m getting a
python error whenever an spss command in spss.Submit does not execute. For example, if there is no variable name ‘varx’
when the spss.Submit has a delete variables varx in it I get an spss error and
the command is not executed, but python also raises an error and does not
complete the rest of the spss.Submit. In the spss GUI I can include something like this and
it runs fine although it raises the error that there is not variable with this
name. I have the same issue if I try to create a variable that is already
there. SPSS raises an error and then python quits. I want to allow for the possibility that a variable has been
created already. I’d like to just be able to always include spss commands
to create it. But it seems that if I do that python quits, and if I try to
delete it first and it’s not there python quits. Is there a way around this? Am I making an error or is this
just how spss.Submit works in python. Thanks Matt Matthew Pirritano, Ph.D. Research Analyst IV Medical Services Initiative (MSI) Orange County Health Care Agency (714) 568-5648 |
Free forum by Nabble | Edit this page |