Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on creating user and starting #7

Closed
tutunci opened this issue Jul 27, 2015 · 9 comments
Closed

Error on creating user and starting #7

tutunci opened this issue Jul 27, 2015 · 9 comments

Comments

@tutunci
Copy link

tutunci commented Jul 27, 2015

Hi,
I'm trying to install Panoramix.
Server is Centos 6.4 and Phyton version is 3.3

After installation I've first error on creating new user and than starting proccess.

Here the logs:

[root@132 panoramix]# fabmanager create-admin
Username [admin]: 
User first name [admin]: 
User last name [user]: 
Email [admin@fab.org]: 
Password: 
Repeat for confirmation: 
Repeat for confirmation: 
2015-07-27 11:20:36,073:WARNING:flask_appbuilder.security.manager:No user yet created, use fabmanager command to do it.
2015-07-27 11:20:36,075:INFO:flask_appbuilder.base:Registering class MyIndexView on menu 
2015-07-27 11:20:36,080:INFO:flask_appbuilder.base:Registering class UtilView on menu 
2015-07-27 11:20:36,083:INFO:flask_appbuilder.base:Registering class LocaleView on menu 
2015-07-27 11:20:36,087:INFO:flask_appbuilder.base:Registering class ResetPasswordView on menu 
2015-07-27 11:20:36,099:INFO:flask_appbuilder.base:Registering class ResetMyPasswordView on menu 
2015-07-27 11:20:36,110:INFO:flask_appbuilder.base:Registering class AuthDBView on menu 
2015-07-27 11:20:36,119:INFO:flask_appbuilder.base:Registering class UserDBModelView on menu List Users
2015-07-27 11:20:36,160:INFO:flask_appbuilder.base:Registering class RoleModelView on menu List Roles
2015-07-27 11:20:36,200:INFO:flask_appbuilder.base:Registering class UserStatsChartView on menu User's Statistics
2015-07-27 11:20:36,236:INFO:flask_appbuilder.base:Registering class PermissionModelView on menu Base Permissions
2015-07-27 11:20:36,268:INFO:flask_appbuilder.base:Registering class ViewMenuModelView on menu Views/Menus
2015-07-27 11:20:36,297:INFO:flask_appbuilder.base:Registering class PermissionViewModelView on menu Permission on Views/Menus
Was unable to import app Error: invalid syntax (models.py, line 49)

On start:

[root@132 panoramix]# python run.py 
Traceback (most recent call last):
  File "run.py", line 1, in <module>
    from app import app
  File "/usr/local/panoramix/app/__init__.py", line 2, in <module>
    from flask import Flask
ImportError: No module named flask

Thanks
Maurizio

@mistercrunch
Copy link
Member

So this message seems to point in the direction that you didn't install the dependencies.
sudo pip install -r requirements.txt

@tutunci
Copy link
Author

tutunci commented Jul 28, 2015

Hi @mistercrunch,
I was able to install everything and after doing "Refresh Metadata" I've loaded all data sources and dimensions.
Now Metrics are not automatically loaded so I've added some but every time I use it into the query I've this result (below) and Druid never receive any query:

File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/usr/local/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 26, in wraps
return f(self, *args, **kwargs)
File "/usr/local/panoramix/app/views.py", line 86, in datasource
form_data=request.args, view=self)
File "/usr/local/panoramix/app/viz.py", line 79, in __init__
self.df = self.bake_query()
File "/usr/local/panoramix/app/viz.py", line 168, in bake_query
client.groupby(**self.query_obj())
File "/usr/local/panoramix/app/viz.py", line 132, in query_obj
for m in ds.metrics if m.metric_name in self.metrics
File "/usr/local/panoramix/app/viz.py", line 132, in <dictcomp>
for m in ds.metrics if m.metric_name in self.metrics
File "/usr/local/panoramix/app/models.py", line 118, in json_obj
return json.loads(self.json)
File "/usr/local/lib/python2.7/json/__init__.py", line 326, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded") 

Can you please explain how Metrics must be setup

Thanks
Maurizio

@mistercrunch
Copy link
Member

Metrics follow the druid aggregation documentation, using json.
http://druid.io/docs/latest/querying/aggregations.html

You can also generate them dynamically from the columns checkboxes. If you check count_distinct, sum, ... on these columns, metrics will get generated the next time you click "Refresh Metadata".

Though I'll push a PR with error handling around the json in there.

@mistercrunch
Copy link
Member

This should help:
#8

the-dcruz added a commit to the-dcruz/caravel that referenced this issue Oct 25, 2016
…ll to dev

* commit '4e7b8a519aa528c16e76414319f38155da380db3':
  pulling from airbnb/master
@amoussoubaruch
Copy link

Hi,
I read all your conversation. I have same problem but it's when i'm trying to connect to druid cluster. I have same error "No JSON object could be decoded". I entered Druid cluster connection information and when i refresh Metadata i have this.
"Error while processing cluster 'druid cluster' No JSON object could be decoded"
Can you please tell me if any more conf is necessary to best connect to druid?

Thanks in advance!

@mistercrunch
Copy link
Member

Pretty sure this is unrelated to this 2 year old issue @amoussoubaruch. You should probably open a new issue.

@amoussoubaruch
Copy link

ok!

@macfly1202
Copy link

@amoussoubaruch : We are using superset with druid on 1 host (dev env) and no issue conection.
Connection is something like this :
capture d ecran_2017-07-28_11-22-18

@amoussoubaruch
Copy link

Thanks @macfly1202

It's resolve since last day. I had a problem with my proxy. I use localhost instead of host IP.

malcolmflint pushed a commit to malcolmflint/superset that referenced this issue Aug 25, 2017
timifasubaa pushed a commit to timifasubaa/incubator-superset that referenced this issue Feb 6, 2018
mistercrunch referenced this issue in mistercrunch/superset Aug 14, 2018
Remove extra dash
NOT PASSING TESTS
graceguo-supercat pushed a commit to graceguo-supercat/superset that referenced this issue Oct 4, 2021
* [core][deps] remove unused deps

* [core][test] add test for response.ok=false

* [core] support csrf_token=''

* [core][tests] move mock to sole function that uses it
zhaoyongjie pushed a commit that referenced this issue Nov 24, 2021
* [core][deps] remove unused deps

* [core][test] add test for response.ok=false

* [core] support csrf_token=''

* [core][tests] move mock to sole function that uses it
zhaoyongjie pushed a commit that referenced this issue Nov 24, 2021
)

* fix(legacy-preset-chart-nvd3): redraw bar values after legend change

* fix(legacy-preset-chart-nvd3): avoid creating multiple nodes

* fix(legacy-preset-chart-nvd3): improve remove
zhaoyongjie pushed a commit that referenced this issue Nov 25, 2021
* [core][deps] remove unused deps

* [core][test] add test for response.ok=false

* [core] support csrf_token=''

* [core][tests] move mock to sole function that uses it
zhaoyongjie pushed a commit that referenced this issue Nov 25, 2021
)

* fix(legacy-preset-chart-nvd3): redraw bar values after legend change

* fix(legacy-preset-chart-nvd3): avoid creating multiple nodes

* fix(legacy-preset-chart-nvd3): improve remove
zhaoyongjie pushed a commit that referenced this issue Nov 26, 2021
* [core][deps] remove unused deps

* [core][test] add test for response.ok=false

* [core] support csrf_token=''

* [core][tests] move mock to sole function that uses it
zhaoyongjie pushed a commit that referenced this issue Nov 26, 2021
)

* fix(legacy-preset-chart-nvd3): redraw bar values after legend change

* fix(legacy-preset-chart-nvd3): avoid creating multiple nodes

* fix(legacy-preset-chart-nvd3): improve remove
JakobMiksch pushed a commit to JakobMiksch/superset that referenced this issue Jan 10, 2023
rguerraZero added a commit to rguerraZero/superset that referenced this issue Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants