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

Created on 5 Jul 2019  ยท  5Comments  ยท  Source: apache/incubator-superset

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!

  • [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [X] I have reproduced the issue with at least the latest released version of superset.
  • [X] I have checked the issue tracker for the same issue and I haven't found one similar.
#bug inactive

Most helpful comment

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

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

All 5 comments

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

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

๐Ÿ‘

Il giorno ven 5 lug 2019 alle ore 09:05 issue-label-bot[bot] <
[email protected]> ha scritto:

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 https://github.com/marketplace/issue-label-bot,
dashboard https://mlbot.net/data/apache/incubator-superset and code
https://github.com/hamelsmu/MLapp for this bot.

โ€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-superset/issues/7825?email_source=notifications&email_token=AARY7UB5CQAVAE4GQWGO7FLP53XCBA5CNFSM4H6ICYUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZIXEZY#issuecomment-508654183,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARY7UAUFUX5USY3WAHU4STP53XCBANCNFSM4H6ICYUA
.

Hi @LucaPrete,

This could be a problem with your config or init steps, have you opened an issue on: https://github.com/amancevice/docker-superset ?

Hello Daniel,

Thanks for replying.
I don't think this was related to the container itself, but as you
mentioned to the configuration, specifically related to the LDAP connector.
We've anyway also opened a bug in the repo
https://github.com/amancevice/docker-superset (that I'll close now..)

We ended up:
1) Using versione 0.28.1, as opposed to 0.20.6 - hoping that the CURL that
other systems of us do can be easily adapted
2) Using the Dockerfile content from the official repo (I wrote to the
owner to understand if this can be built automatically on Dockerhub - would
be nice to consume directly an image, as opposed to a copy and paste of the
code), but I still haven't received a reply. btw, any chance someone can
help us with this?

Application wise, things seem to work for now. We're able to bring up the
container and successfully connect to LDAP using the same configuration we
used to have before.

I think -besides point 2 that can be discussed somewhere else- the issue
can be closed. Although, it's for sure still relevant for 0.20.6, which I'm
not sure is still supported.

Best,

-Luca

Il giorno mer 10 lug 2019 alle ore 11:31 Daniel Vaz Gaspar <
[email protected]> ha scritto:

Hi @LucaPrete https://github.com/LucaPrete,

This could be a problem with your config or init steps, have you opened an
issue on: https://github.com/amancevice/docker-superset ?

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/incubator-superset/issues/7825?email_source=notifications&email_token=AARY7UBDJO2DEIJNPHWOJZ3P6WT7XA5CNFSM4H6ICYUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZS4QEI#issuecomment-509986833,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AARY7UA2H25CUEKIP6V3YIDP6WT7XANCNFSM4H6ICYUA
.

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.

Was this page helpful?
0 / 5 - 0 ratings