jjmontesl / cubesviewer

Explore and visualize analytical datasets
http://www.cubesviewer.com
Other
441 stars 112 forks source link

Comma in dimension name causes filtering error #78

Open fpieront opened 8 years ago

fpieront commented 8 years ago

I have found that with CubesViewer 2.0.2, Cubes 1.1 and Django 1.9, dimensions containing a comma produce the following error when selected for filtering:

capture

The Cubes slicer server returns:

    condition = context.condition_for_cell(cell)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 948, in condition_for_cell
    condition = and_(*self.conditions_for_cuts(cell.cuts))
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 966, in conditions_for_cuts
    hierarchy, cut.invert)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 1004, in condition_for_point
    levels = self.level_keys(dim, hierarchy, path)
  File "build/bdist.linux-x86_64/egg/cubes/sql/query.py", line 1098, in level_keys
    raise HierarchyError("Path '{}' is longer than hierarchy. "
NameError: global name 'HierarchyError' is not defined

The request passed to the Cubes server is the following:

"GET /cube/listings_cube_ph/aggregate?cut=agent%40default%3ADimension%2C+Name. HTTP/1.0" 500 -

(it seems that '%2C represents the comma). `