dosubot[bot] commented on issue #29908:
URL: https://github.com/apache/superset/issues/29908#issuecomment-2280853622
<!-- Answer -->
To resolve the "NameError: name 'results_backend' is not defined" error in
your `superset_config.py` file, you need to ensure that `results_backend` is
properly defined and initialized.
Here is how you can define and initialize `results_backend` in your
`superset_config.py`:
```python
from flask_caching.backends.filesystemcache import FileSystemCache
# Initialize the results_backend
RESULTS_BACKEND = FileSystemCache("/app/superset_home/sqllab")
# Access the actual object behind the proxy
actual_results_backend = RESULTS_BACKEND._get_current_object()
```
This ensures that `results_backend` is properly defined and references the
`FileSystemCache` instance. If you are using a different caching backend, make
sure to import and initialize it accordingly.
Additionally, ensure you have the necessary dependencies installed for the
caching backend you are using. For `FileSystemCache`, you need the
`flask-caching` package:
```bash
pip install flask-caching
```
This should resolve the `NameError` and allow Superset to start correctly
<sup>[[1]](https://github.com/apache/superset/blob/master/superset/extensions/__init__.py)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/docker/pythonpath_dev/superset_config.py)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]