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.

Superset cannot start, reporting "AttributeError: 'NoneType' object has no attribute 'session' at startup"

See original GitHub issue

I’m trying both Superset 0.20.6 and 0.28.1 (need to run them as containers, downloaded from dockerhub from https://hub.docker.com/r/amancevice/superset). At startup, both versions throw at some point an exception with the following error: AttributeError: 'NoneType' object has no attribute 'session'

Expected results

Superset start with no issues.

Actual results

Superset throws the following exception. Following is what I see using the 0.20.6 version.

superset    | Loaded your LOCAL configuration at [/etc/superset/superset_config.py]
superset    | Traceback (most recent call last):
superset    |   File "/usr/local/bin/superset", line 12, in <module>
superset    |     from superset.cli import manager
superset    |   File "/usr/local/lib/python3.5/dist-packages/superset/__init__.py", line 153, in <module>
superset    |     security_manager_class=app.config.get("CUSTOM_SECURITY_MANAGER"))
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/base.py", line 131, in __init__
superset    |     self.init_app(app, session)
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/base.py", line 157, in init_app
superset    |     self._add_admin_views()
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/base.py", line 254, in _add_admin_views
superset    |     self.sm.register_views()
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/security/sqla/manager.py", line 67, in register_views
superset    |     super(SecurityManager, self).register_views()
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/security/manager.py", line 443, in register_views
superset    |     category_label=_('Security'))
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/base.py", line 345, in add_view
superset    |     baseview = self._check_and_init(baseview)
superset    |   File "/usr/local/lib/python3.5/dist-packages/flask_appbuilder/base.py", line 294, in _check_and_init
superset    |     if baseview.datamodel.session is None:
superset    | AttributeError: 'NoneType' object has no attribute 'session'

How to reproduce the bug

Environment

  • superset version: 0.20.6 or 0.28.1
  • python version: 3 (coming with docker container)

Checklist

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 there are 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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
issue-label-bot[bot]commented, Jul 5, 2019

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.95. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

0reactions
stale[bot]commented, Sep 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'NoneType' object has no attribute 'session' at startup ... - GitHub
I'm trying both Superset 0.20.6 and 0.28.1 (need to run them as containers, downloaded from dockerhub from ...
Read more >
'NoneType' object has no attribute 'append' error in Django ...
I'm trying to store a list of items in a Django session. The code is below,
Read more >
NoneType object has no attribute strip in session display - Indico
NoneType object has no attribute strip in session display. Reported by: arescope, Owned by: arescope. Priority: high, Milestone: v0.98.1.
Read more >
Openedx Import Fails With "'Nonetype' Object Has No Attribute ...
LucaPrete opened a new issue #7825: Superset cannot start reporting AttributeError: 'NoneType' object has no attribute 'session' at startup URL:.
Read more >
Python Tutorial | Zacks Blog
Launch Python Interactive Session; Run Python file .py , which saved complete Python code with no Error . Python Interactive Session: Run in ......
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