读取0x000000000000000C(Maxl DLL)时出错

2024-10-04 09:31:57 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用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

Tags: inselfhostconnectpasswordutfencodedll