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 2022/02/09 07:57:42 UTC
[GitHub] [superset] JPRMohnish opened a new issue #18631: Operational Error While setting up local backend via command superset init without docker-compose
JPRMohnish opened a new issue #18631:
URL: https://github.com/apache/superset/issues/18631
I always get the following error while setting up the local backend for apache-superset following this article https://superset.apache.org/docs/Contributing/local-backend/
#### How to reproduce the bug
1. `cd superset`
```bash
# Create a virtual environment and activate it (recommended)
python3 -m venv venv # setup a python3 virtualenv
source venv/bin/activate
# Install external dependencies
pip install -r requirements/testing.txt
# Install Superset in editable (development) mode
pip install -e .
# Initialize the database
superset db upgrade
# Create an admin user in your metadata database (use `admin` as username to be able to load the examples)
superset fab create-admin
# Create default roles and permissions
superset init
```
### Expected results
Apache superset must start successfully but upon running superset init the following error occurs frequently
what you expected to happen.
### Actual results
superset init command exits with exit code 1 and throwing following output.
clearly it can be seen the error is ```sqlite3.OperationalError: no such column: dbs.allow_file_upload```
```bash
(venv) (base) mohnish@MMMDVMOHNISHSINT superset % superset init
--------------------------------------------------------------------------------
WARNING
--------------------------------------------------------------------------------
A Default SECRET_KEY was detected, please use superset_config.py to override it.
Use a strong complex alphanumeric string and use a tool to help you generate
a sufficiently random sequence, ex: openssl rand -base64 42
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
logging was configured successfully
2022-02-09 12:27:38,482:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-02-09 12:27:38,492:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/flask_caching/__init__.py:201: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
warnings.warn(
Syncing role definition
2022-02-09 12:27:40,476:INFO:superset.security.manager:Syncing role definition
Syncing Admin perms
2022-02-09 12:27:40,483:INFO:superset.security.manager:Syncing Admin perms
Syncing Alpha perms
2022-02-09 12:27:40,548:INFO:superset.security.manager:Syncing Alpha perms
Syncing Gamma perms
2022-02-09 12:27:40,613:INFO:superset.security.manager:Syncing Gamma perms
Syncing granter perms
2022-02-09 12:27:40,679:INFO:superset.security.manager:Syncing granter perms
Syncing sql_lab perms
2022-02-09 12:27:40,742:INFO:superset.security.manager:Syncing sql_lab perms
Fetching a set of all perms to lookup which ones are missing
2022-02-09 12:27:40,805:INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
Creating missing datasource permissions.
2022-02-09 12:27:40,864:INFO:superset.security.manager:Creating missing datasource permissions.
Traceback (most recent call last):
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlite3.OperationalError: no such column: dbs.allow_file_upload
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/mohnish/Desktop/superset/venv/bin/superset", line 33, in <module>
sys.exit(load_entry_point('apache-superset', 'console_scripts', 'superset')())
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/flask/cli.py", line 586, in main
return super(FlaskGroup, self).main(*args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/decorators.py", line 21, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/flask/cli.py", line 426, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/Users/mohnish/Desktop/superset/superset/cli/main.py", line 61, in init
security_manager.sync_role_definitions()
File "/Users/mohnish/Desktop/superset/superset/security/manager.py", line 726, in sync_role_definitions
self.create_missing_perms()
File "/Users/mohnish/Desktop/superset/superset/security/manager.py", line 668, in create_missing_perms
merge_pv("datasource_access", datasource.get_perm())
File "/Users/mohnish/Desktop/superset/superset/connectors/sqla/models.py", line 634, in get_perm
return f"[{self.database}].[{self.table_name}](id:{self.id})"
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 294, in __get__
return self.impl.get(instance_state(instance), dict_)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/orm/attributes.py", line 730, in get
value = self.callable_(state, passive)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/orm/strategies.py", line 759, in _load_for_state
return self._emit_lazyload(
File "<string>", line 1, in <lambda>
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/orm/strategies.py", line 847, in _emit_lazyload
q(session)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/ext/baked.py", line 615, in _load_on_pk_identity
result = list(bq.for_session(self.session).params(**params))
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/ext/baked.py", line 444, in __iter__
return q._execute_and_instances(context)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/orm/query.py", line 3560, in _execute_and_instances
result = conn.execute(querycontext.statement, self._params)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1011, in execute
return meth(self, multiparams, params)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 298, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1124, in _execute_clauseelement
ret = self._execute_context(
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1316, in _execute_context
self._handle_dbapi_exception(
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1510, in _handle_dbapi_exception
util.raise_(
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
raise exception
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1276, in _execute_context
self.dialect.do_execute(
File "/Users/mohnish/Desktop/superset/venv/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 608, in do_execute
cursor.execute(statement, parameters)
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such column: dbs.allow_file_upload
[SQL: SELECT dbs.uuid AS dbs_uuid, dbs.created_on AS dbs_created_on, dbs.changed_on AS dbs_changed_on, dbs.id AS dbs_id, dbs.verbose_name AS dbs_verbose_name, dbs.database_name AS dbs_database_name, dbs.sqlalchemy_uri AS dbs_sqlalchemy_uri, dbs.password AS dbs_password, dbs.cache_timeout AS dbs_cache_timeout, dbs.select_as_create_table_as AS dbs_select_as_create_table_as, dbs.expose_in_sqllab AS dbs_expose_in_sqllab, dbs.configuration_method AS dbs_configuration_method, dbs.allow_run_async AS dbs_allow_run_async, dbs.allow_file_upload AS dbs_allow_file_upload, dbs.allow_ctas AS dbs_allow_ctas, dbs.allow_cvas AS dbs_allow_cvas, dbs.allow_dml AS dbs_allow_dml, dbs.force_ctas_schema AS dbs_force_ctas_schema, dbs.allow_multi_schema_metadata_fetch AS dbs_allow_multi_schema_metadata_fetch, dbs.extra AS dbs_extra, dbs.encrypted_extra AS dbs_encrypted_extra, dbs.impersonate_user AS dbs_impersonate_user, dbs.server_cert AS dbs_server_cert, dbs.is_managed_externally AS dbs_is_managed_extern
ally, dbs.external_url AS dbs_external_url, dbs.created_by_fk AS dbs_created_by_fk, dbs.changed_by_fk AS dbs_changed_by_fk
FROM dbs
WHERE dbs.id = ?]
[parameters: (1,)]
(Background on this error at: http://sqlalche.me/e/13/e3q8)
(venv) (base) mohnish@MMMDVMOHNISHSINT superset % FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger
```
#### Screenshots
If applicable, add screenshots to help ex
<img width="1792" alt="Screenshot 2022-02-09 at 1 21 38 PM" src="https://user-images.githubusercontent.com/47176966/153145639-d26a2cc5-7542-4d37-87a3-37c4b1d035a4.png">
plain your problem.
### Environment
(please complete the following information):
- browser type and version: chrome latest macos
- superset version: cloning directly from master branch
- python version: 3.9
- node.js version: 16.13.2
- any feature flags active:
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [x] I have checked the superset logs for python stack traces and included them here as text if there are any.
- [x] I have reproduced the issue with at least the latest released version of the superset.
- [x] I have checked the issue tracker for the same issue and I haven't found one similar.
### Additional context
Please help me get this error resolved as soon as possible
--
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
[GitHub] [superset] srinify commented on issue #18631: Operational Error While setting up local backend via command superset init without docker-compose
Posted by GitBox <gi...@apache.org>.
srinify commented on issue #18631:
URL: https://github.com/apache/superset/issues/18631#issuecomment-1033734011
Hey there, we're hoping to keep Github issues focused on bugs. This seems like an issue related to database state & migration, not a core Superset bug (I've run into this issue before). Let's continue the discussion in the Superset Slack (I saw that you created a discussion there)
--
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
[GitHub] [superset] srinify closed issue #18631: Operational Error While setting up local backend via command superset init without docker-compose
Posted by GitBox <gi...@apache.org>.
srinify closed issue #18631:
URL: https://github.com/apache/superset/issues/18631
--
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