question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run superset 0.22.1 appear flask-appbuilder None type error

See original GitHub issue

Make sure these boxes are checked before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven’t found one similar

Superset version

0.22.1

I update my superset today, but found warning in my every step of superset initialtion

2018-01-16 20:17:45,625:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,626:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,917:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,917:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'

No matter which init step, like fabmanager create-admin --app superset, superset db upgrade, superset init to superset runserver, all of them pop error message as shown above.

The following are steps to reproduce:

fabmanager create-admin --app superset


Username [admin]: a
User first name [admin]: a
User last name [user]: a
Email [admin@fab.org]: a@gmail.com
Password:
Repeat for confirmation:
2018-01-16 20:17:45,625:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,626:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,917:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:17:45,917:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
Recognized Database Authentications.
Admin User a created.

superset db upgrade

2018-01-16 20:21:50,474:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:21:50,475:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
2018-01-16 20:21:50,754:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:21:50,754:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.

superset runserver

2018-01-16 20:22:38,572:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:22:38,573:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
2018-01-16 20:22:38,880:ERROR:flask_appbuilder.base:'NoneType' object has no attribute 'name'
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/base.py", line 462, in _add_permission
    self.sm.add_permissions_view(baseview.base_permissions, baseview.__class__.__name__)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/flask_appbuilder/security/manager.py", line 804, in add_permissions_view
    if perm_view.permission.name not in base_permissions:
AttributeError: 'NoneType' object has no attribute 'name'
2018-01-16 20:22:38,880:ERROR:flask_appbuilder.base:Add Permission on View Error: 'NoneType' object has no attribute 'name'
Starting server with command:
gunicorn -w 2 --timeout 60 -b  0.0.0.0:8088 --limit-request-line 0 --limit-request-field_size 0 superset:app

[2018-01-16 20:22:39 +0800] [71749] [INFO] Starting gunicorn 19.7.1
[2018-01-16 20:22:39 +0800] [71749] [INFO] Listening at: http://0.0.0.0:8088 (71749)
[2018-01-16 20:22:39 +0800] [71749] [INFO] Using worker: sync
[2018-01-16 20:22:39 +0800] [71752] [INFO] Booting worker with pid: 71752
[2018-01-16 20:22:39 +0800] [71753] [INFO] Booting worker with pid: 71753
[2018-01-16 20:22:40 +0800] [71752] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/util.py", line 352, in import_app
    __import__(module)
  File "/Users/serena/Documents/serena/incubator-superset/superset/__init__.py", line 156, in <module>
    update_perms=utils.get_update_perms_flag(),
TypeError: __init__() got an unexpected keyword argument 'update_perms'
[2018-01-16 20:22:40 +0800] [71752] [INFO] Worker exiting (pid: 71752)
[2018-01-16 20:22:40 +0800] [71753] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/util.py", line 352, in import_app
    __import__(module)
  File "/Users/serena/Documents/serena/incubator-superset/superset/__init__.py", line 156, in <module>
    update_perms=utils.get_update_perms_flag(),
TypeError: __init__() got an unexpected keyword argument 'update_perms'
[2018-01-16 20:22:40 +0800] [71753] [INFO] Worker exiting (pid: 71753)
Traceback (most recent call last):
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/bin/gunicorn", line 11, in <module>
    sys.exit(run())
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 74, in run
    WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/base.py", line 203, in run
    super(Application, self).run()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/app/base.py", line 72, in run
    Arbiter(self).run()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 231, in run
    self.halt(reason=inst.reason, exit_status=inst.exit_status)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 344, in halt
    self.stop()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 393, in stop
    time.sleep(0.1)
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 244, in handle_chld
    self.reap_workers()
  File "/Users/serena/Documents/serena/incubator-superset/fix_css/lib/python2.7/site-packages/gunicorn/arbiter.py", line 524, in reap_workers
    raise HaltServer(reason, self.WORKER_BOOT_ERROR)
gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

cannot start superset 😰, and even I started in older version, the css is missing somehow… I am using OSX, is there anything wrong with my computer?? I used to successfully setup and start superset, but seems unlucky this time.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
xiaohanyucommented, Jan 18, 2018

@yamyamyuo the official document already has commands to run from source code.

For frontend build, just follow some basic steps:

  • Use yarn install to get all dependencies from npm, do not use npm, it often has bugs
  • Use npm run dev to run development webpack server for frontend assets, with debug info, and large size assets. Or use npm run build to build production assets, with smaller size.
1reaction
mistercrunchcommented, Jan 17, 2018

The update_perms error means you haven’t upgrade flask-appbuilder as specified in a recent setup.py. If you’re developing against the repo run pip instal -e . from the root of the repo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

run superset 0.22.1 appear flask-appbuilder None type error
base:'NoneType' object has no attribute 'name' Traceback (most recent call last): File "/Users/serena/Documents/serena/incubator-superset/ ...
Read more >
Configuring Superset
To configure Superset metastore set SQLALCHEMY_DATABASE_URI config key on superset_config to the appropriate connection string. Running on a WSGI HTTP Server​.
Read more >
[GitHub] [incubator-superset] jaganineleaps removed a ...
... flask-appbuilder<4.0.0,>=3.0.1->apache-superset==0.999.0.dev0) ... (line 9)) (from versions: none) > ERROR: No matching distribution ...
Read more >
CONTRIBUTING.md · ZNing/superset - Gitee.com
Frontend assets (TypeScript, JavaScript, CSS, and images) must be compiled in order to properly display the web UI. The superset-frontend directory contains all ......
Read more >
attribute error in Flask when I run (AttributeError: 'NoneType ...
python - attribute error in Flask when I run (AttributeError: 'NoneType' object has no attribute 'run' ) - Stack Overflow. Stack Overflow for ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found