Skip to content

Error on creating user and starting #7

Closed

Description

@tutunci

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 [[email protected]]: 
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

Activity

  1. mistercrunch commented on Jul 27, 2015

    @mistercrunch
    Member

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

  2. tutunci commented on Jul 28, 2015

    @tutunci
    Author

    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

  3. mistercrunch commented on Jul 28, 2015

    @mistercrunch
    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.

  4. mistercrunch commented on Jul 28, 2015

    @mistercrunch
    Member

    This should help:
    #8

  5. added a commit that references this issue on Oct 25, 2016
  6. amoussoubaruch commented on Jul 26, 2017

    @amoussoubaruch

    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!

  7. mistercrunch commented on Jul 27, 2017

    @mistercrunch
    Member

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

  8. amoussoubaruch commented on Jul 28, 2017

    @amoussoubaruch

    ok!

  9. macfly1202 commented on Jul 28, 2017

    @macfly1202

    @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

  10. amoussoubaruch commented on Jul 28, 2017

    @amoussoubaruch

    Thanks @macfly1202

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

  11. added a commit that references this issue on Aug 25, 2017
  12. added a commit that references this issue on Feb 6, 2018
  13. added a commit that references this issue on Aug 14, 2018
  14. 10 remaining items

  15. added a commit that references this issue on Feb 9, 2024
  16. added a commit that references this issue on Feb 12, 2026
  17. added a commit that references this issue on Apr 14, 2026
    6330791
  18. added 2 commits that reference this issue on Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions