Make sure these boxes are checked before submitting your issue - thank you!
0.24.0
create the yaml file successful
$ superset export_datasources
2018-04-08 17:18:57,891:INFO:root:Starting export
Traceback (most recent call last):
File "/home/xxx/.virtualenvs/yyy/bin/superset", line 15, in
manager.run()
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/flask_script/__init__.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/flask_script/__init__.py", line 386, in handle
res = handle(args, *config)
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/flask_script/commands.py", line 216, in __call__
return self.run(args, *kwargs)
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/superset/cli.py", line 251, in export_datasources
include_defaults=include_defaults)
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/superset/dict_import_export_util.py", line 40, in export_to_dict
include_defaults=include_defaults) for database in dbs]
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/superset/dict_import_export_util.py", line 40, in
include_defaults=include_defaults) for database in dbs]
File "/home/xxx/.virtualenvs/yyy/lib/python3.5/site-packages/superset/models/helpers.py", line 196, in export_to_dict
key=lambda k: sorted(k.items()))
TypeError:
see https://github.com/attardi/deepnl/issues/54
export is need python2.7, but import is py3 better (avoid UnicodeEncodeError)
btw, i use py2 to export, and py3 to import, it works right. (not need Cython)
Hi,
I Had the same error when trying to export datasources.
Superset version : 0.26.3
Python version : 3.6.3
Error :
Loaded your LOCAL configuration at [/opt/superset/venv3/bin/superset_config.py]
2018-08-27 11:25:40,921:INFO:root:Starting export
Traceback (most recent call last):
File "/opt/superset/venv3/bin/superset", line 15, in
manager.run()
File "/opt/superset/venv3/lib/python3.6/site-packages/flask_script/__init__.py", line 417, in run
result = self.handle(argv[0], argv[1:])
File "/opt/superset/venv3/lib/python3.6/site-packages/flask_script/__init__.py", line 386, in handle
res = handle(args, *config)
File "/opt/superset/venv3/lib/python3.6/site-packages/flask_script/commands.py", line 216, in __call__
return self.run(args, *kwargs)
File "/opt/superset/venv3/lib/python3.6/site-packages/superset/cli.py", line 290, in export_datasources
include_defaults=include_defaults)
File "/opt/superset/venv3/lib/python3.6/site-packages/superset/dict_import_export_util.py", line 41, in export_to_dict
include_defaults=include_defaults) for database in dbs]
File "/opt/superset/venv3/lib/python3.6/site-packages/superset/dict_import_export_util.py", line 41, in
include_defaults=include_defaults) for database in dbs]
File "/opt/superset/venv3/lib/python3.6/site-packages/superset/models/helpers.py", line 206, in export_to_dict
key=lambda k: sorted(k.items()))
TypeError:
Did you managed to solve it ?
Thank you.
Exporting worked on my development version after the sorted function is removed from helpers.py file.
file: helpers.py
export_to_dict
replace "key=lambda k: sorted(k.items()))" with "key=lambda k: (k.items()))"
I'm hitting this as well. I'll see how hard it is to test my fix, but I've pushed up a branch here: https://github.com/apache/incubator-superset/commit/710f0e4b99f355ddabb76d81cb4230d461984b20
@chancez after using your changes I am getting this error now for that line: TypeError: '<' not supported between instances of 'bool' and 'str'
Yah, I hit that too. I haven't had time to revisit this.
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.
Most helpful comment
Exporting worked on my development version after the sorted function is removed from helpers.py file.
file: helpers.py
export_to_dict
replace "key=lambda k: sorted(k.items()))" with "key=lambda k: (k.items()))"