Representation of dimensions and cubes as a file

Skip to first unread message

Steffen Hartmann

Jun 9, 2016, 1:30:33 PM6/9/16
to Cubes
Hey guys,

I got a lot of dimensions and cubes and I would like to create a file for each of them.
I followed the instruction here, but I do get an exception while starting the slicer server:

2016-06-09 19:24:36,849 DEBUG Importing model from cube_complaint.json. Provider: None Store: None NS: None
Traceback (most recent call last):
  File "C:\Python34\Scripts\", line 9, in <module>
    load_entry_point('cubes==1.0.1', 'console_scripts', 'slicer')()
  File "C:\Python34\lib\site-packages\cubes\slicer\", line 516, in main
  File "C:\Python34\lib\site-packages\cubes\slicer\", line 195, in run_server
    cubes.server.run_server(config, debug=args.debug)
  File "C:\Python34\lib\site-packages\cubes\server\", line 56, in run_server
    app = create_server(config)
  File "C:\Python34\lib\site-packages\cubes\server\", line 47, in create_server
    app.register_blueprint(slicer, config=config, **_options)
  File "C:\Python34\lib\site-packages\flask\", line 62, in wrapper_func
    return f(self, *args, **kwargs)
  File "C:\Python34\lib\site-packages\flask\", line 889, in register_blueprint
    blueprint.register(self, options, first_registration)
  File "C:\Python34\lib\site-packages\flask\", line 153, in register
  File "C:\Python34\lib\site-packages\flask\", line 128, in wrapper
  File "C:\Python34\lib\site-packages\cubes\server\", line 101, in initialize_slicer
    current_app.cubes_workspace = Workspace(config, **_options)
  File "C:\Python34\lib\site-packages\cubes\", line 328, in __init__
  File "C:\Python34\lib\site-packages\cubes\", line 492, in import_model
    provider = extensions.model_provider(provider_name, model)
  File "C:\Python34\lib\site-packages\cubes\", line 113, in __call__
    return self.create(_extension_name, *args, **kwargs)
  File "C:\Python34\lib\site-packages\cubes\", line 126, in create
    return extension(*args, **kwargs)
  File "C:\Python34\lib\site-packages\cubes\", line 314, in __init__
    super(StaticModelProvider, self).__init__(*args, **kwargs)
  File "C:\Python34\lib\site-packages\cubes\", line 59, in __init__
    self.dimensions_metadata[dim["name"]] = dim
TypeError: string indices must be integers

Here is my setup:

model: model.json
cube_complaint: cube_complaint.json
dim_issue: dim_issue.json

"name": "Complaint Model",
"label": "Complaint Model",
"cubes": [
{"name": "cube_complaint"}
"dimensions": [
{"name": "dim_issue"}

"name": "dim_issue",
"label": "Issue",
"attributes": [
{"name": "IssueID", "label": "Issue Number"},
{"name": "IssueName", "label": "Issue Name"}

"name": "cube_complaint",
"label": "Complaints",
"dimensions": [ "dim_issue" ]

If I merge the dimension and the cube by hand, everything works well for me.
Furthermore I do net get the exception when I remove the dimension list inside the cube.

Are there any more detailed information about file representation?

Thanks alot!

Reply all
Reply to author
0 new messages