DataBrewery / cubes

[NOT MAINTAINED] Light-weight Python OLAP framework for multi-dimensional data analysis
http://cubes.databrewery.org
Other
1.49k stars 314 forks source link

Hello world Issue #318

Open miholeus opened 9 years ago

miholeus commented 9 years ago

I run the server with command

slicer serve slicer.ini

then try to fetch some data

and get the following error

Internal Cubes error (ModelError): Aggregate 'double_amount_sum' function mismatch. Implicit function sum, explicit function: None.

Stack trace:

DEBUG Exception stack trace: Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1475, in full_dispatch_request rv = self.dispatch_request() File "/usr/local/lib/python2.7/site-packages/Flask-0.10.1-py2.7.egg/flask/app.py", line 1461, in dispatch_request return self.view_functionsrule.endpoint File "/usr/local/lib/python2.7/site-packages/cubes/server/decorators.py", line 79, in wrapper cube = authorized_cube(cube_name, g.locale) File "/usr/local/lib/python2.7/site-packages/cubes/server/decorators.py", line 128, in authorized_cube cube = workspace.cube(cube_name, g.auth_identity, locale=locale) File "/usr/local/lib/python2.7/site-packages/cubes/workspace.py", line 572, in cube cube = ns.cube(basename, locale=locale, recursive=recursive) File "/usr/local/lib/python2.7/site-packages/cubes/namespace.py", line 138, in cube cube = provider.cube(name, locale) File "/usr/local/lib/python2.7/site-packages/cubes/providers.py", line 292, in cube return create_cube(metadata) File "/usr/local/lib/python2.7/site-packages/cubes/model.py", line 2164, in create_cube existing.function)) ModelError: Aggregate 'double_amount_sum' function mismatch. Implicit function sum, explicit function: None.

127.0.0.1 - - [02/Sep/2015 16:58:11] "GET /cube/irbd_balance/aggregate?drilldown=year HTTP/1.1" 500

dmitryakadiamond commented 9 years ago

Just want to confirm, fresh install according to manual gives this error.

realvinay commented 9 years ago

Yes, I'm facing the same issue.

realvinay commented 9 years ago

Ok, I got a solution. You need to follow "Customised Installation" part of the documentation as well. That is

git clone git://github.com/DataBrewery/cubes.git
cd cubes
pip install -r requirements.txt
pip install -r requirements-optional.txt
python setup.py install

After this, you will be able to run hello_world -

cd examples/hello_world
python prepare_data.py
slicer serve slicer.ini

Running the examples:

curl "http://localhost:5000/cube/irbd_balance/aggregate"
curl "http://localhost:5000/cube/irbd_balance/aggregate?drilldown=year"
curl "http://localhost:5000/cube/irbd_balance/aggregate?drilldown=item"
curl "http://localhost:5000/cube/irbd_balance/aggregate?drilldown=item&cut=item:e"
ariansdq commented 8 years ago

I tried the solution above and it worked for me aswell