Re: Python is still not running (better: spss is not running from python)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Python is still not running (better: spss is not running from python)

Peck, Jon
I think it is likely that you have SPSS 14.0.2 but the wrong version of the Plug-In, since running spss from Python was added via the 14.0.1 Plug-In.  Also access to the case data from Python was added in that release.  Upgrading SPSS to 14.0.2 does not upgrade the Plug-In.  You need to uninstall the Plug-In you have, download the 14.0.1 version from Developer Central (www.spss.com/devcentral), and install it.

Another way to check is to enter the following Python statement
from spss import Cursor
If you get a message like
ImportError: cannot import name Cursor
then you can be sure, since Cursor was part of 14.0.1  (14.0.1 works for 14.0.2 also).

If none of this solves the problem, please contact Technical Support for further help.

Regards,
Jon Peck
SPSS

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Heiko Klemm
Sent: Tuesday, July 04, 2006 9:02 AM
To: [hidden email]
Subject: [SPSSX-L] Python is still not running (better: spss is not running from python)

Here is some more Information:



- I CAN run python from the Syntax window. But I CAN'T run spss from the
Python IDE.

- I patched to 14.0.2 before I started to use python.



Thanx again for your help





Heiko Klemm

MRSC



Deutsche Post World Net

Business  Consulting GmbH

Market Research Service Center

Tulpenfeld 2

 53113 Bonn

Germany



T. +49 228 2435 740

mailto:[hidden email] <mailto:[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Python is still not running (better: spss is not running from python)

K. Asselberghs
I have exactly the same problem. I can run python from spss, but not
spss from python. A few months ago (in March) I had an exchange about
this problem with SPSS technical support, but they still have not been
able to offer  a solution. Then I had the problem with spss version
14.0.1, but upgrading to version 14.0.2 (and uninstalling/reinstalling
the latest version of the python plug-in) does not help. Then as now I
get the same error message.

Python executes "import spss" without error message, and the spss object
seems to be available then.

But "print spss.IsBackendReady()" returns false (if spss is loaded or not),
and executing "spss.Submit("show directory")" returns the following
error message:

Traceback (most recent call last):
  File "C:/Python24/testspss.py", line 2, in -toplevel-
    spss.Submit("show directory")
  File "C:\Python24\lib\site-packages\spss\spss.py", line 1020, in Submit
    StartSPSS()
  File "C:\Python24\lib\site-packages\spss\spss.py", line 154, in StartSPSS
    raise SpssError,error
SpssError: [errLevel 1011] Cannot load SPSS XD API.

Do other SPSS/Phython users have this problem, has somebody a clue?

Peck, Jon wrote:

>I think it is likely that you have SPSS 14.0.2 but the wrong version of the Plug-In, since running spss from Python was added via the 14.0.1 Plug-In.  Also access to the case data from Python was added in that release.  Upgrading SPSS to 14.0.2 does not upgrade the Plug-In.  You need to uninstall the Plug-In you have, download the 14.0.1 version from Developer Central (www.spss.com/devcentral), and install it.
>
>Another way to check is to enter the following Python statement
>from spss import Cursor
>If you get a message like
>ImportError: cannot import name Cursor
>then you can be sure, since Cursor was part of 14.0.1  (14.0.1 works for 14.0.2 also).
>
>If none of this solves the problem, please contact Technical Support for further help.
>
>Regards,
>Jon Peck
>SPSS
>
>-----Original Message-----
>From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Heiko Klemm
>Sent: Tuesday, July 04, 2006 9:02 AM
>To: [hidden email]
>Subject: [SPSSX-L] Python is still not running (better: spss is not running from python)
>
>Here is some more Information:
>
>
>
>- I CAN run python from the Syntax window. But I CAN'T run spss from the
>Python IDE.
>
>- I patched to 14.0.2 before I started to use python.
>
>
>
>Thanx again for your help
>
>
>
>
>
>Heiko Klemm
>
>MRSC
>
>
>
>Deutsche Post World Net
>
>Business  Consulting GmbH
>
>Market Research Service Center
>
>Tulpenfeld 2
>
> 53113 Bonn
>
>Germany
>
>
>
>T. +49 228 2435 740
>
>mailto:[hidden email] <mailto:[hidden email]>
>
>
>