开发者

SPSS Python Error

Getting the following error when trying to run SPSS from an external Python IDE.

import spss

yields the following error

Traceback (most recent call last):
  File "C:\Documents and Settings\USER\workspace\SPSS\src\NE ASQ 2010.py", line 6, in <m开发者_运维问答odule>
    import spss
  File "C:\Python26\Lib\site-packages\spss180\spss\spss.py", line 16, in <module>
    error = errCode()
  File "C:\Python26\Lib\site-packages\spss180\spss\errMsg.py", line 24, in __init__
    self.errMsg = errTable['okay'][str(0)]
KeyError: 'okay'

Ran the Python essentials plug-in with no errors. Funny thing is that I dont get an error when I run this in a syntax

BEGIN PROGRAM PYTHON.
import spss
num = spss.GetVariableCount()
print num
END PROGRAM.

Any help will be much appreciated.

Brock


I believe I figured out the issue. I needed to configure Eclipse to see the external python modules that are created when you install the SPSS/Python plugin. I had to set a reference to the modules when configuring the project.

Once I did that, it looks like I am up and running!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜