You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sebastianliebscher (via GitHub)" <gi...@apache.org> on 2023/05/22 17:07:30 UTC
[GitHub] [superset] sebastianliebscher commented on issue #17049: Import of datasources (`superset import-datasources`) fails
sebastianliebscher commented on issue #17049:
URL: https://github.com/apache/superset/issues/17049#issuecomment-1557591415
I can reproduce this with [latest master](https://github.com/apache/superset/tree/71d0543f28711ed70fcfb8086489661596aa2075) branch in dev environment (docker-compose.yaml).
steps to reproduce:
1. `docker-compose up`
2. `superset load-examples -f`
3. `superset export-datasources -f export.zip`
4. `unzip export.zip` and replace XXXX with `superset` in examples database yaml
5. `zip -r export.zip dataset_export_20230522T165815`
6. `superset import-datasources -p export.zip`
the import fails with:
```bash
2023-05-22 17:00:45,370:ERROR:superset.datasets.commands.importers.dispatcher:Error running import command
Traceback (most recent call last):
File "/app/superset/commands/importers/v1/__init__.py", line 78, in run
self._import(db.session, self._configs, self.overwrite)
File "/app/superset/datasets/commands/importers/v1/__init__.py", line 59, in _import
database = import_database(session, config, overwrite=False)
File "/app/superset/databases/commands/importers/v1/utils.py", line 35, in import_database
can_write = ignore_permissions or security_manager.can_access(
File "/app/superset/security/manager.py", line 351, in can_access
user = g.user
File "/usr/local/lib/python3.9/site-packages/flask/ctx.py", line 52, in __getattr__
raise AttributeError(name) from None
AttributeError: user
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/datasets/commands/importers/dispatcher.py", line 57, in run
command.run()
File "/app/superset/commands/importers/v1/__init__.py", line 85, in run
raise self.import_error() from ex
superset.datasets.commands.exceptions.DatasetImportError: Import dataset failed for an unknown reason
2023-05-22 17:00:45,371:ERROR:superset.cli.importexport:There was an error when importing the dataset(s), please check the exception traceback in the log
Traceback (most recent call last):
File "/app/superset/commands/importers/v1/__init__.py", line 78, in run
self._import(db.session, self._configs, self.overwrite)
File "/app/superset/datasets/commands/importers/v1/__init__.py", line 59, in _import
database = import_database(session, config, overwrite=False)
File "/app/superset/databases/commands/importers/v1/utils.py", line 35, in import_database
can_write = ignore_permissions or security_manager.can_access(
File "/app/superset/security/manager.py", line 351, in can_access
user = g.user
File "/usr/local/lib/python3.9/site-packages/flask/ctx.py", line 52, in __getattr__
raise AttributeError(name) from None
AttributeError: user
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/cli/importexport.py", line 193, in import_datasources
ImportDatasetsCommand(contents, overwrite=True).run()
File "/app/superset/datasets/commands/importers/dispatcher.py", line 68, in run
raise exc
File "/app/superset/datasets/commands/importers/dispatcher.py", line 57, in run
command.run()
File "/app/superset/commands/importers/v1/__init__.py", line 85, in run
raise self.import_error() from ex
superset.datasets.commands.exceptions.DatasetImportError: Import dataset failed for an unknown reason
```
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org