Python 2.5导入dll AttributeError

时间:2010-07-22 19:37:27

标签: dllimport python-2.5 attributeerror

我有一个在Py2.4中运行peachy的程序。我导入TobiiPlugin.dll文件,然后运行我的脚本。

import TobiiPlugin as tobii
tobii.setGazeSubjectProfile(3, 0)

然而,当我把代码移到Py2.5时,它对我很生气,我得到了

Traceback (most recent call last):
  File "C:\tobiiDll\TobiiPlugin\Debug\logger_speech.py", line 274, in <module>
    main()
  File "C:\tobiiDll\TobiiPlugin\Debug\logger_speech.py", line 242, in main
    tobii.setGazeSubjectProfile(3, 0)
  File "C:\Python25\lib\ctypes\__init__.py", line 325, in __getattr__
    func = self.__getitem__(name)
  File "C:\Python25\lib\ctypes\__init__.py", line 330, in __getitem__
    func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'setGazeSubjectProfile' not found
>>>

一切都设法丢失了?它不仅仅是这个功能。我尝试了DLL中的其他人,他们也没有工作。谢谢!

1 个答案:

答案 0 :(得分:0)

由于某种原因,Tobii SDK 3.0 Beta仅适用于Python 2.4或Python 2.6。