Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exporting Datasource to YAML fails #7437

Open
rjurney opened this issue May 3, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@rjurney
Copy link
Contributor

commented May 3, 2019

Exporting the main sqlite database to YAML via the List Databases interface and its Export to YAML option fails with the error TypeError: '<' not supported between instances of 'dict' and 'dict'.

Expected results

I expect to receive a YAML file.

Actual results

2019-05-02 21:28:47,467:INFO:werkzeug:127.0.0.1 - - [02/May/2019 21:28:47] "GET /databaseview/list/ HTTP/1.1" 200 -
2019-05-02 21:28:48,209:INFO:werkzeug:127.0.0.1 - - [02/May/2019 21:28:48] "GET /superset/csrf_token/ HTTP/1.1" 200 -
g2019-05-02 21:37:49,117:INFO:werkzeug:127.0.0.1 - - [02/May/2019 21:37:49] "POST /databaseview/action_post HTTP/1.1" 500 -
Traceback (most recent call last):
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 2309, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 2295, in wsgi_app
    response = self.handle_exception(e)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 1741, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/Users/rjurney/Software/incubator-superset/venv/lib/python3.6/site-packages/flask_appbuilder/views.py", line 578, in action_post
    return action.func(items)
  File "/Users/rjurney/Software/incubator-superset/superset/views/base.py", line 195, in yaml_export
    data = [t.export_to_dict() for t in items]
  File "/Users/rjurney/Software/incubator-superset/superset/views/base.py", line 195, in <listcomp>
    data = [t.export_to_dict() for t in items]
  File "/Users/rjurney/Software/incubator-superset/superset/models/helpers.py", line 215, in export_to_dict
    key=lambda k: sorted(k.items()))
TypeError: '<' not supported between instances of 'dict' and 'dict'

Screenshots

If applicable, add screenshots to help explain your problem.

How to reproduce the bug

  1. Go to /databaseview/list/
  2. Click on the checkbox for the 'main' database
  3. Select the 'Actions' menu
  4. Click on 'Export to YAML'
  5. Click 'OK'
  6. See error

Environment

(please complete the following information):

  • superset version: [e.g. v0.31, release--0.31, 700cbf4f]
  • python version: Python 3.6.7
  • node.js version: v11.6.0
  • npm version: 6.5.0

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-label-bot

This comment has been minimized.

Copy link

commented May 3, 2019

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.