读取0x000000000000000C(Maxl DLL)时出现OSError

时间:2019-08-29 18:56:15

标签: python essbase

我正在尝试使用Maxl DLL连接到Essbase,但出现错误。我认为此错误与ctype有关,但我不太确定如何找到根本原因并解决此问题。任何指导将不胜感激。

Using Maxl DLL in C:\ORACLE\Middleware\EPMSystem11R1\common\EssbaseRTC-64\11.1.2.0\bin\essmaxlu.dll
Traceback (most recent call last):

  File "<ipython-input-8-c96d45911659>", line 42, in <module>
    eh = esss.connect("userID", "password", "123.123.123.123")

  File "C:\Python3\Lib\Essbase.py", line 220, in connect
    self.sts = self.maxl.MaxLSessionCreate(c_char_p(host.encode('utf-8')), c_char_p(user.encode('utf-8')), c_char_p(password.encode('utf-8')), byref(self.ssnInit), byref(self.sid))

OSError: exception: access violation reading 0x000000000000000C

这就是我所拥有的:

def connect(self, user, password, host='localhost'):
    self.sid = c_ushort(0)
    self.ssnInit = maxl_ssninit_t()
    self.sts = self.maxl.MaxLSessionCreate(c_char_p(host.encode('utf-8')), c_char_p(user.encode('utf-8')), c_char_p(password.encode('utf-8')), byref(self.ssnInit), byref(self.sid))
    self.user = user
    self.numFlds = 0
    self.bMdxQuery = 0

0 个答案:

没有答案