You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/05/31 12:01:51 UTC
[GitHub] [incubator-superset] revolutionisme opened a new issue #7629:
AttributeError: 'list' object has no attribute 'values' while importing
dashboards
revolutionisme opened a new issue #7629: AttributeError: 'list' object has no attribute 'values' while importing dashboards
URL: https://github.com/apache/incubator-superset/issues/7629
I am trying to migrate superset from one VM to another and I have set up superset with apache2 on the new VM and I am trying to import some dashboards from the old website. Whenever I try to upload, I am getting this following error.
```
[2019-05-31 11:45:19,486] ERROR in app: Exception on /superset/import_dashboards [POST]
Traceback (most recent call last):
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 1017, in wrapper
value = f(*args, **kwargs)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 123, in wraps
return f(self, *args, **kwargs)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/views/core.py", line 1256, in import_dashboards
dashboard_import_export_util.import_dashboards(db.session, f.stream)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/dashboard_import_export_util.py", line 26, in import_dashboards
dashboard, import_time=import_time)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 543, in import_obj
alter_positions(dashboard_to_import, old_to_new_slc_id_dict)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 483, in alter_positions
position_json = position_data.values()
AttributeError: 'list' object has no attribute 'values'
Exception on /superset/import_dashboards [POST]
Traceback (most recent call last):
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1982, in wsgi_app
response = self.full_dispatch_request()
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1614, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1517, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/_compat.py", line 33, in reraise
raise value
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1612, in full_dispatch_request
rv = self.dispatch_request()
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask/app.py", line 1598, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 1017, in wrapper
value = f(*args, **kwargs)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/flask_appbuilder/security/decorators.py", line 123, in wraps
return f(self, *args, **kwargs)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/views/core.py", line 1256, in import_dashboards
dashboard_import_export_util.import_dashboards(db.session, f.stream)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/dashboard_import_export_util.py", line 26, in import_dashboards
dashboard, import_time=import_time)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 543, in import_obj
alter_positions(dashboard_to_import, old_to_new_slc_id_dict)
File "/home/vidhiadmin/supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py", line 483, in alter_positions
position_json = position_data.values()
AttributeError: 'list' object has no attribute 'values'
```
### Expected results
Dashboards to be uploaded successfully.
### Actual results
I get the folllowing error - "AttributeError: 'list' object has no attribute 'values'" in supersetsetup/venv/lib/python3.6/site-packages/superset/models/core.py
#### Screenshots
![image](https://user-images.githubusercontent.com/738958/58704204-7bbad980-83ab-11e9-8c48-9e9d8a30e1ea.png)
If applicable, add screenshots to help explain your problem.
#### How to reproduce the bug
Setup superset with apache2, then go to <domainname>/superset/import_dashboards
### Environment
(please complete the following information):
- superset version: `0.28.1 (From pypi)`
- python version: `Python 3.6.7`
- node.js version: `Not Applicable`
- npm version: `Not Applicable`
### 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.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org