Incubator-superset: Error on Delete. sqlalchemy.exc.ResourceClosedError: This transaction is closed

Created on 4 Sep 2020  路  3Comments  路  Source: apache/incubator-superset

I used the official superset helm charts here to install superset. But I get an error on save.

Expected results

Superset to save results with no error.

Actual results

`ERROR:flask_appbuilder.models.sqla.interface:Delete record error: This transaction is closed
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2597, in _flush
flush_context.execute()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
rec.execute(self)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/unitofwork.py", line 624, in execute
uow,
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 326, in delete_obj
_organize_states_for_delete(base_mapper, states, uowtransaction)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 463, in _organize_states_for_delete
base_mapper, uowtransaction, states
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/persistence.py", line 1602, in _connections_for_states
connection = uowtransaction.transaction.connection(base_mapper)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 311, in connection
self._assert_active()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 304, in _assert_active
raise sa_exc.ResourceClosedError(closed_msg)
sqlalchemy.exc.ResourceClosedError: This transaction is closed

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask_appbuilder/models/sqla/interface.py", line 634, in delete
self.session.commit()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/scoping.py", line 162, in do
return getattr(self.registry(), name)(args, *kwargs)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 1036, in commit
self.transaction.commit()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 503, in commit
self._prepare_impl()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 482, in _prepare_impl
self.session.flush()
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2496, in flush
self._flush(objects)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2637, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/langhelpers.py", line 81, in __exit__
compat.raise_(value, with_traceback=traceback)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/util/compat.py", line 178, in raise_
raise exception
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 2637, in _flush
transaction.rollback(_capture_exception=True)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 519, in rollback
self._assert_active(prepared_ok=True, rollback_ok=True)
File "/usr/local/lib/python3.6/site-packages/sqlalchemy/orm/session.py", line 304, in _assert_active
raise sa_exc.ResourceClosedError(closed_msg)
sqlalchemy.exc.ResourceClosedError: This transaction is closed
`

Screenshots

image

Environment

(please complete the following information):

  • superset version: superset version Superset 0.999.0dev
  • python version: python --version Python 3.6.9
  • node.js version: node -v none in this container
  • npm version: npm -v none in this 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.

Additional context

none.

#bug inactive more-info

Most helpful comment

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

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

All 3 comments

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

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

Could you please fill out a detailed description of the steps to reproduce this issue, also add a chunk of log prior to the error itself.

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