The current analytical workspace code seems to have some import error.
I tried this ..
from cubes import Workspace
workspace = Workspace(config="slicer.ini")
workspace.import_model("model.json")
workspace.list_cubes()
And I get this error:
---------------------------------------------------------------------------
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
I'm using the 1.0.1 version.
And have tried the latest master from github, but that fails even at the
from cubes import Workspace