You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org> on 2023/04/28 05:38:33 UTC
[GitHub] [superset] Abhijeetsinghjat opened a new issue, #23861: Error while running superset db upgrade
Abhijeetsinghjat opened a new issue, #23861:
URL: https://github.com/apache/superset/issues/23861
I am trying to install apache superset and got an error while running superset db upgrade command
#### How to reproduce the bug
1. Open/create virtual environment with linux
2. Then install the superset
3. After that upgrade the db by the command: **superset db upgrade**
### Expected results
I am expecting that by running the command **superset db upgrade** the database will load some sample data
### Actual results
getting error saying that **AttributeError: module 'sqlparse.keywords' has no attribute 'FLAGS'**
#### Screenshots
![image](https://user-images.githubusercontent.com/130652565/235054798-21013487-d7c7-4e03-8bcd-f82596ec74e9.png)
### Environment
(please complete the following information):
- browser type and version: I am running in virtual env
- superset version: `1.4`
- python version: `3.10.6`
- node.js version: `NA`
- any feature flags active: no
--
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.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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1535691751
thanks @sfirke for the help.
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1532948494
> > We haven't found any Content Security Policy (CSP)
>
> I don't see any error, CSP is a warning, you can understand it more by reading [https://superset.apache.org/docs/security/#content-security-policy-csp](url)
>
> Regarding Caching, it's another warning that you didn't configure any caching, I use redis on my ubuntu, setting it up is easy and on the official documentation you can configure it [https://superset.apache.org/docs/installation/cache](url)
>
> Anyway, your Superset works even with ignoring those two warnings, but it's preferable to setup a caching system, and it might be preferable to setup CSP in case your Superset will get public access.
If I am ignoring the warning and running superset and adding any dataset I am getting below error:
**for prop in class_mapper(obj).iterate_properties:
Syncing role definition
2023-05-03 17:54:34,467:INFO:superset.security.manager:Syncing role definition
Syncing Admin perms
2023-05-03 17:54:34,478:INFO:superset.security.manager:Syncing Admin perms
Syncing Alpha perms
2023-05-03 17:54:34,582:INFO:superset.security.manager:Syncing Alpha perms
Syncing Gamma perms
2023-05-03 17:54:34,713:INFO:superset.security.manager:Syncing Gamma perms
Syncing granter perms
2023-05-03 17:54:34,854:INFO:superset.security.manager:Syncing granter perms
Syncing sql_lab perms
2023-05-03 17:54:34,964:INFO:superset.security.manager:Syncing sql_lab perms
Fetching a set of all perms to lookup which ones are missing
2023-05-03 17:54:35,059:INFO:superset.security.manager:Fetching a set of all perms to lookup which ones are missing
Creating missing datasource permissions.
2023-05-03 17:54:35,173:INFO:superset.security.manager:Creating missing datasource permissions.
Traceback (most recent call last):
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 126, in decrypt
decrypted = decrypted.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/supersetvenv/bin/superset", line 8, in <module>
sys.exit(superset())
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/flask/cli.py", line 567, in main
return super().main(*args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/flask/cli.py", line 407, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/flask/cli.py", line 407, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/root/supersetvenv/lib/python3.10/site-packages/superset/cli/main.py", line 62, in init
security_manager.sync_role_definitions()
File "/root/supersetvenv/lib/python3.10/site-packages/superset/security/manager.py", line 802, in sync_role_definitions
self.create_missing_perms()
File "/root/supersetvenv/lib/python3.10/site-packages/superset/security/manager.py", line 750, in create_missing_perms
merge_pv("datasource_access", datasource.get_perm())
File "/root/supersetvenv/lib/python3.10/site-packages/superset/connectors/sqla/models.py", line 720, in get_perm
if self.database is None:
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 487, in __get__
return self.impl.get(state, dict_)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 959, in get
value = self._fire_loader_callables(state, key, passive)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/attributes.py", line 995, in _fire_loader_callables
return self.callable_(state, passive)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 912, in _load_for_state
return self._emit_lazyload(
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/strategies.py", line 996, in _emit_lazyload
return loading.load_on_pk_identity(
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 541, in load_on_pk_identity
return result.one()
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1522, in one
return self._only_one_row(
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 559, in _only_one_row
row = onerow(hard_close=True)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1386, in _fetchone_impl
return self._real_result._fetchone_impl(hard_close=hard_close)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 1801, in _fetchone_impl
row = next(self.iterator, _NO_ROW)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/orm/loading.py", line 147, in chunks
fetch = cursor._raw_all_rows()
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 393, in _raw_all_rows
return [make_row(row) for row in rows]
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/engine/result.py", line 393, in <listcomp>
return [make_row(row) for row in rows]
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy/sql/type_api.py", line 1712, in process
return process_value(impl_processor(value), dialect)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 479, in process_result_value
value = super().process_result_value(value=value, dialect=dialect)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 424, in process_result_value
decrypted_value = self.engine.decrypt(value)
File "/root/supersetvenv/lib/python3.10/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 128, in decrypt
raise ValueError('Invalid decryption key')
ValueError: Invalid decryption key**
--
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] khaldoun92 commented on issue #23861: Error while running superset db upgrade
Posted by "khaldoun92 (via GitHub)" <gi...@apache.org>.
khaldoun92 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527290961
> > The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
>
> Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
>
> **Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
>
> anything I am missing?
you need to setup your flask app
```shell
export FLASK_APP=superset # on Ubuntu
set FLASK_APP=superset # on windows
```
it it doesn't work, then you need to try out
```shell
$env:FLASK_APP="SupersetPath\Superset\Lib\site-packages\superset\app.py"
```
--
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] khaldoun92 commented on issue #23861: Error while running superset db upgrade
Posted by "khaldoun92 (via GitHub)" <gi...@apache.org>.
khaldoun92 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527498689
> > > > > > The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
> > > > >
> > > > >
> > > > > Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
> > > > > **Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
> > > > > anything I am missing?
> > > >
> > > >
> > > > you need to setup your flask app
> > > > ```shell
> > > > export FLASK_APP=superset # on Ubuntu
> > > > set FLASK_APP=superset # on windows
> > > > ```
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > it it doesn't work, then you need to try out
> > > > ```shell
> > > > $env:FLASK_APP="SupersetPath\Superset\Lib\site-packages\superset\app.py"
> > > > ```
> > >
> > >
> > > ## I tried running the command: **export FLASK_APP=superset # on Ubuntu** after that I tried **superset db upgrade** command and got below error:
> > > **--------------------------------------------------------------------------------
> > > 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
> > > Refusing to start due to insecure SECRET_KEY**
> > > any help on above warning?
> >
> >
> > Okay it means when you installed your superset first time, you didn't configure any secret key for encrypting, old version was giving only warning regard that, new version enforce you to have it. You need to setup a secret key. Same question is #23598 try to check it out. I remember ending up commenting out the code where it asks for that, but it's not a good thing to do. just try to update the secret key and see how does it work
>
> Yes I am installing superset for first time. How can I change the secret key? I gone through the question(#23598) but it didn't help me.
In your superset_config.py file. add those lines
```python
# Generate with `openssl rand -base64 42`
SECRET_KEY = "result from openssl rand -base64 42"
```
After that it should work. it means go to your terminal, execute `openssl rand -base64 42`, copy the result and put it in your superset_config.py as SECRET_KEY = "Result"
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1534466078
> Seems like you set up Superset with one SECRET_KEY and are now using a different one? See the docs on key rotation for how to specify your current key and your new key: https://superset.apache.org/docs/installation/configuring-superset/
Yes it was key issue I reinstalled everything then it was working. But I am not getting an option for Embedded Dashboard under share:
![image](https://user-images.githubusercontent.com/130652565/236170540-e68c5ccb-d85e-443f-b022-fbd63e516a3e.png)
any idea how can I do that? I have configured below things:
**SESSION_COOKIE_SAMESITE = None
ENABLE_PROXY_FIX = True
"EMBEDDED_SUPERSET": True
CORS_OPTIONS = {
'supports_credentials': True,
'allow_headers': ['*'],
'resources':['*'],
'origins': ['http://localhost:8088', 'http://localhost:8888']
}
FEATURE_FLAGS = {..., "EMBEDDED_SUPERSET": True}
**
@khaldoun92
--
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] Shubham-Nehete commented on issue #23861: Error while running superset db upgrade
Posted by "Shubham-Nehete (via GitHub)" <gi...@apache.org>.
Shubham-Nehete commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1716995943
But where is the superset_config.py file present?
I'm installing it from scratch using ubuntu terminal.
--
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] Kunalshinde15 commented on issue #23861: Error while running superset db upgrade
Posted by "Kunalshinde15 (via GitHub)" <gi...@apache.org>.
Kunalshinde15 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1651514093
getting error while "superset db upgrade"
errore: (base) C:\Users\kunal\miniconda3>set FLASK_APP-superset
Environment variable FLASK_APP-superset not defined
--
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] Abhijeetsinghjat closed issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat closed issue #23861: Error while running superset db upgrade
URL: https://github.com/apache/superset/issues/23861
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527451184
> > > > > The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
> > > >
> > > >
> > > > Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
> > > > **Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
> > > > anything I am missing?
> > >
> > >
> > > you need to setup your flask app
> > > ```shell
> > > export FLASK_APP=superset # on Ubuntu
> > > set FLASK_APP=superset # on windows
> > > ```
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > it it doesn't work, then you need to try out
> > > ```shell
> > > $env:FLASK_APP="SupersetPath\Superset\Lib\site-packages\superset\app.py"
> > > ```
> >
> >
> > ## I tried running the command: **export FLASK_APP=superset # on Ubuntu** after that I tried **superset db upgrade** command and got below error:
> > **--------------------------------------------------------------------------------
> > 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
> > Refusing to start due to insecure SECRET_KEY**
> > any help on above warning?
>
> Okay it means when you installed your superset first time, you didn't configure any secret key for encrypting, old version was giving only warning regard that, new version enforce you to have it. You need to setup a secret key. Same question is #23598 try to check it out. I remember ending up commenting out the code where it asks for that, but it's not a good thing to do. just try to update the secret key and see how does it work
Yes I am installing superset for first time. How can I change the secret key? I gone through the question(#23598) but it didn't help me.
--
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] frafra commented on issue #23861: Error while running superset db upgrade
Posted by "frafra (via GitHub)" <gi...@apache.org>.
frafra commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527124455
Please do not mention random nicknames: if everybody does that, superset users and contributors would get flooded with non-relevant notifications. I would also suggest copying and paste text instead of screenshot it, as that makes it less readable.
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1532713676
> pip install sqlparse=='0.4.3'
Thanks for the help I followed the steps you mentioned and that error got resolved but now I am facing new error:
**2023-05-03 14:55:34,606:INFO:superset.utils.logging_configurator:logging was configured successfully
2023-05-03 14:55:34,611:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
We haven't found any Content Security Policy (CSP) defined in the configurations. Please make sure to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any other external software. Failing to configure CSP have serious security implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
2023-05-03 14:55:34,611:WARNING:superset.initialization:We haven't found any Content Security Policy (CSP) defined in the configurations. Please make sure to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any other external software. Failing to configure CSP have serious security implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2023-05-03 14:55:34,613:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2023-05-03 14:55:34,616:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
/root/supersetvenv/lib/python3.10/site-packages/flask_appbuilder/models/sqla/interface.py:67: SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to column slices.datasource_id, which conflicts with relationship(s): 'Slice.table' (copies tables.id to slices.datasource_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="table"' to the 'SqlaTable.slices' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
for prop in class_mapper(obj).iterate_properties:
WARNI [alembic.env] SQLite Database support for metadata databases will be removed in a future version of Superset.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.**
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527285527
> The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
**Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
anything I am missing?
--
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] khaldoun92 commented on issue #23861: Error while running superset db upgrade
Posted by "khaldoun92 (via GitHub)" <gi...@apache.org>.
khaldoun92 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527281490
The problem is probably due to your sqlparse version
just try out `pip install sqlparse=='0.4.3'` , it should work after it
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527016826
@frafra , @ryw , @moonboots , @jeremi any help?
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527301437
> > > The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
> >
> >
> > Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
> > **Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
> > anything I am missing?
>
> you need to setup your flask app
>
> ```shell
> export FLASK_APP=superset # on Ubuntu
> set FLASK_APP=superset # on windows
> ```
>
> it it doesn't work, then you need to try out
>
> ```shell
> $env:FLASK_APP="SupersetPath\Superset\Lib\site-packages\superset\app.py"
> ```
I tried running the command: **export FLASK_APP=superset # on Ubuntu** after that I tried **superset db upgrade** command and got below error:
**--------------------------------------------------------------------------------
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
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Refusing to start due to insecure SECRET_KEY**
any help on above warning?
--
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] khaldoun92 commented on issue #23861: Error while running superset db upgrade
Posted by "khaldoun92 (via GitHub)" <gi...@apache.org>.
khaldoun92 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1532906755
> We haven't found any Content Security Policy (CSP)
I don't see any error, CSP is a warning, you can understand it more by reading [https://superset.apache.org/docs/security/#content-security-policy-csp](url)
Regarding Caching, it's another warning that you didn't configure any caching, I use redis on my ubuntu, setting it up is easy and on the official documentation you can configure it [https://superset.apache.org/docs/installation/cache](url)
Anyway, your Superset works even with ignoring those two warnings, but it's preferable to setup a caching system, and it might be preferable to setup CSP in case your Superset will get public access.
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1532715263
> @Abhijeetsinghjat Maybe the problem with default secret key is in that superset doesn't find superset_config.py. Try to set PYTHONPATH to directory where superset_config.py (and anctually all superset) is: export PYTHONPATH=/home/dimon/superset/; superset db upgrade
thanks for the help that error is resolved now but I am getting new error:
**2023-05-03 14:55:34,606:INFO:superset.utils.logging_configurator:logging was configured successfully
2023-05-03 14:55:34,611:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
We haven't found any Content Security Policy (CSP) defined in the configurations. Please make sure to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any other external software. Failing to configure CSP have serious security implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
2023-05-03 14:55:34,611:WARNING:superset.initialization:We haven't found any Content Security Policy (CSP) defined in the configurations. Please make sure to configure CSP using the TALISMAN_ENABLED and TALISMAN_CONFIG keys or any other external software. Failing to configure CSP have serious security implications. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more information. You can disable this warning using the CONTENT_SECURITY_POLICY_WARNING key.
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2023-05-03 14:55:34,613:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `FILTER_STATE_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
2023-05-03 14:55:34,616:WARNING:superset.utils.cache_manager:Falling back to the built-in cache, that stores data in the metadata database, for the following cache: `EXPLORE_FORM_DATA_CACHE_CONFIG`. It is recommended to use `RedisCache`, `MemcachedCache` or another dedicated caching backend for production deployments
/root/supersetvenv/lib/python3.10/site-packages/flask_appbuilder/models/sqla/interface.py:67: SAWarning: relationship 'SqlaTable.slices' will copy column tables.id to column slices.datasource_id, which conflicts with relationship(s): 'Slice.table' (copies tables.id to slices.datasource_id). If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="table"' to the 'SqlaTable.slices' relationship. (Background on this error at: https://sqlalche.me/e/14/qzyx)
for prop in class_mapper(obj).iterate_properties:
WARNI [alembic.env] SQLite Database support for metadata databases will be removed in a future version of Superset.
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.**
any help?
--
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] Abhijeetsinghjat commented on issue #23861: Error while running superset db upgrade
Posted by "Abhijeetsinghjat (via GitHub)" <gi...@apache.org>.
Abhijeetsinghjat commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527139097
> Please do not mention random nicknames: if everybody does that, superset users and contributors would get flooded with non-relevant notifications. I would also suggest copying and paste text instead of screenshot it, as that makes it less readable.
I have updated the ticket with proper error text with screenshot as well. I was not aware whom to tag so whatever suggestions I got I added them. Moving ahead will take care.
--
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] khaldoun92 commented on issue #23861: Error while running superset db upgrade
Posted by "khaldoun92 (via GitHub)" <gi...@apache.org>.
khaldoun92 commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527311315
> > > > The problem is probably due to your sqlparse version just try out `pip install sqlparse=='0.4.3'` , it should work after it
> > >
> > >
> > > Thanks for the help I ran the sqlparse version command and after that I again tried superset db upgrade command and got below error:
> > > **Error: Could not locate a Flask application. You did not provide the "FLASK_APP" environment variable, and a "wsgi.py" or "app.py" module was not found in the current directory.**
> > > anything I am missing?
> >
> >
> > you need to setup your flask app
> > ```shell
> > export FLASK_APP=superset # on Ubuntu
> > set FLASK_APP=superset # on windows
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > it it doesn't work, then you need to try out
> > ```shell
> > $env:FLASK_APP="SupersetPath\Superset\Lib\site-packages\superset\app.py"
> > ```
>
> ## I tried running the command: **export FLASK_APP=superset # on Ubuntu** after that I tried **superset db upgrade** command and got below error:
> **--------------------------------------------------------------------------------
> 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
> Refusing to start due to insecure SECRET_KEY**
>
> any help on above warning?
Okay it means when you installed your superset first time, you didn't configure any secret key for encrypting, old version was giving only warning regard that, new version enforce you to have it.
You need to setup a secret key.
Same question is #23598 try to check it out.
I remember ending up commenting out the code where it asks for that, but it's not a good thing to do. just try to update the secret key and see how does it work
--
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] Skryabind commented on issue #23861: Error while running superset db upgrade
Posted by "Skryabind (via GitHub)" <gi...@apache.org>.
Skryabind commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1527797190
@Abhijeetsinghjat
Maybe the problem with default secret key is in that superset doesn't find superset_config.py. Try to set PYTHONPATH to directory where superset_config.py (and anctually all superset) is:
export PYTHONPATH=/home/dimon/superset/; superset db upgrade
--
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] sfirke commented on issue #23861: Error while running superset db upgrade
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1533249489
Seems like you set up Superset with one SECRET_KEY and are now using a different one? See the docs on key rotation for how to specify your current key and your new key: https://superset.apache.org/docs/installation/configuring-superset/
--
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] sfirke commented on issue #23861: Error while running superset db upgrade
Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #23861:
URL: https://github.com/apache/superset/issues/23861#issuecomment-1534729352
Great that you solved the SECRET_KEY issue and can now run `superset db upgrade`. That should close this issue. For help with your new problem, you might try the #embedding-superset channel on Slack -- the link to join Slack chat is on the main Superset repo readme page.
--
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