python cubes分析工作区list_cubes()失败

时间:2015-10-28 12:29:58

标签: python olap-cube cubes

当前的分析工作区代码似乎有一些导入错误。

我试过了..

function AnsiCompareStr(const S1, S2: string): Integer;
begin
{$IFDEF MSWINDOWS}
  Result := CompareString(LOCALE_USER_DEFAULT, 0, PChar(S1), Length(S1),
    PChar(S2), Length(S2)) - 2;
{$ENDIF}
{$IFDEF LINUX}
  // glibc 2.1.2 / 2.1.3 implementations of strcoll() and strxfrm()
  // have severe capacity limits.  Comparing two 100k strings may
  // exhaust the stack and kill the process.
  // Fixed in glibc 2.1.91 and later.
  Result := strcoll(PChar(S1), PChar(S2));
{$ENDIF}
end;

function AnsiCompareText(const S1, S2: string): Integer;
begin
{$IFDEF MSWINDOWS}
  Result := CompareString(LOCALE_USER_DEFAULT, NORM_IGNORECASE, PChar(S1),
    Length(S1), PChar(S2), Length(S2)) - 2;
{$ENDIF}
{$IFDEF LINUX}
  Result := WideCompareText(S1, S2);
{$ENDIF}
end;

我收到了这个错误:

from cubes import Workspace
workspace = Workspace(config="slicer.ini")
workspace.import_model("model.json")
workspace.list_cubes()

我使用的是1.0.1版本 并且尝试过github的最新大师,但即使在

也是如此

--------------------------------------------------------------------------- NameError Traceback (most recent call last) <ipython-input-6-f80f0974af47> in <module>() ----> 1 workspace.list_cubes() /home/anand/.virtualenvs/cubes/local/lib/python2.7/site-packages/cubes/workspace.pyc in list_cubes(self, identity) 535 """ 536 --> 537 all_cubes = self.namespace.list_cubes(recursive=True) 538 539 if self.authorizer: /home/anand/.virtualenvs/cubes/local/lib/python2.7/site-packages/cubes/namespace.pyc in list_cubes(self, recursive) 112 name = cube["name"] 113 if name in cube_names: --> 114 raise ModelError("Duplicate cube '%s'" % name) 115 cube_names.add(name) 116 NameError: global name 'ModelError' is not defined

0 个答案:

没有答案