krsnik93 opened a new issue #14589:
URL: https://github.com/apache/superset/issues/14589
I ran `superset export-dashboards` on a fresh install of latest master
(12.05.2021.)
### Expected results
Expect command to export resources.
### Actual results
```
There was an error when exporting the dashboards, please check the exception
traceback in the log
Traceback (most recent call last):
File "/home/fedora/superset/repo/superset/superset/cli.py", line 269, in
export_dashboards
for file_name, file_content in ExportDashboardsCommand(
File "/home/fedora/superset/repo/superset/superset/commands/export.py",
line 50, in run
self.validate()
File "/home/fedora/superset/repo/superset/superset/commands/export.py",
line 67, in validate
self._models = self.dao.find_by_ids(self.model_ids)
File "/home/fedora/superset/repo/superset/superset/dao/base.py", line 74,
in find_by_ids
query = cls.base_filter( # pylint: disable=not-callable
File "/home/fedora/superset/repo/superset/superset/dashboards/filters.py",
line 73, in apply
if is_user_admin():
File "/home/fedora/superset/repo/superset/superset/views/base.py", line
258, in is_user_admin
user_roles = [role.name.lower() for role in list(get_user_roles())]
File "/home/fedora/superset/repo/superset/superset/views/base.py", line
251, in get_user_roles
if g.user.is_anonymous:
AttributeError: 'NoneType' object has no attribute 'is_anonymous'
2021-05-12 11:34:09,092:ERROR:superset.cli:There was an error when exporting
the dashboards, please check the exception traceback in the log
Traceback (most recent call last):
File "/home/fedora/superset/repo/superset/superset/cli.py", line 269, in
export_dashboards
for file_name, file_content in ExportDashboardsCommand(
File "/home/fedora/superset/repo/superset/superset/commands/export.py",
line 50, in run
self.validate()
File "/home/fedora/superset/repo/superset/superset/commands/export.py",
line 67, in validate
self._models = self.dao.find_by_ids(self.model_ids)
File "/home/fedora/superset/repo/superset/superset/dao/base.py", line 74,
in find_by_ids
query = cls.base_filter( # pylint: disable=not-callable
File "/home/fedora/superset/repo/superset/superset/dashboards/filters.py",
line 73, in apply
if is_user_admin():
File "/home/fedora/superset/repo/superset/superset/views/base.py", line
258, in is_user_admin
user_roles = [role.name.lower() for role in list(get_user_roles())]
File "/home/fedora/superset/repo/superset/superset/views/base.py", line
251, in get_user_roles
if g.user.is_anonymous:
AttributeError: 'NoneType' object has no attribute 'is_anonymous'
```
#### How to reproduce the bug
1. Install Superset latest master in editable mode
2. Run `superset export-dashboards`
### Environment
(please complete the following information):
- superset version: 0.999.0dev
- python version: Python 3.8.7
- node.js version: v14.16.0
### Checklist
Make sure to follow these steps 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]