Issue 1011 superset encountered an unexpected error

Issue Code Reference This page lists issue codes that may be displayed in Superset and provides additional context. Issue 1000​ It’s likely your datasource has grown too large to run the current query, and is timing out. You can resolve this by reducing the size of your datasource or by modifying your query to […]

Содержание

  1. Issue Code Reference
  2. Issue 1000​
  3. Issue 1001​
  4. Issue 1002​
  5. Issue 1003​
  6. Issue 1004​
  7. Issue 1005​
  8. Issue 1006​
  9. Issue 1007​
  10. Issue 1008​
  11. Issue 1009​
  12. Issue 1010​
  13. Issue 1011​
  14. Issue 1012​
  15. Issue 1013​
  16. Issue 1014​
  17. Issue 1015​
  18. Issue 1016​
  19. Issue 1017​
  20. Issue 1018​
  21. Issue 1019​
  22. Issue 1020​
  23. Issue 1021​
  24. Issue 1022​
  25. Issue 1023​
  26. Issue 1024​
  27. Issue 1025​
  28. Issue 1026​
  29. Issue 1027​
  30. Issue 1028​
  31. Issue 1029​
  32. Issue 1030​
  33. Issue 1031​
  34. Issue 1032​
  35. Issue 1033​
  36. Issue 1034​
  37. Issue 1035​
  38. Issue 1036​
  39. DB engine Error while performing custom viz plugin in apache superset #18943
  40. Comments
  41. How to reproduce the bug
  42. Expected results
  43. Actual results
  44. Screenshots
  45. Environment
  46. Checklist
  47. Additional context
  48. DB engine Error #20968
  49. Comments
  50. DB engine Error about superset HOT 8 OPEN
  51. Comments (8)
  52. Related Issues (20)
  53. Recommend Projects
  54. React
  55. Vue.js
  56. Typescript
  57. TensorFlow
  58. Django
  59. Laravel
  60. Recommend Topics
  61. javascript
  62. server
  63. Machine learning
  64. Visualization
  65. Recommend Org
  66. Facebook
  67. Microsoft

Issue Code Reference

This page lists issue codes that may be displayed in Superset and provides additional context.

Issue 1000​

It’s likely your datasource has grown too large to run the current query, and is timing out. You can resolve this by reducing the size of your datasource or by modifying your query to only process a subset of your data.

Issue 1001​

Your query may have timed out because of unusually high load on the database engine. You can make your query simpler, or wait until the database is under less load and try again.

Issue 1002​

Your query failed because of an error that occurred on the database. This may be due to a syntax error, a bug in your query, or some other internal failure within the database. This is usually not an issue within Superset, but instead a problem with the underlying database that serves your query.

Issue 1003​

Your query failed because of a syntax error within the underlying query. Please validate that all columns or tables referenced within the query exist and are spelled correctly.

Issue 1004​

Your query failed because it is referencing a column that no longer exists in the underlying datasource. You should modify the query to reference the replacement column, or remove this column from your query.

Issue 1005​

Your query failed because it is referencing a table that no longer exists in the underlying database. You should modify your query to reference the correct table.

Issue 1006​

Your query was not submitted to the database because it’s missing one or more parameters. You should define all the parameters referenced in the query in a valid JSON document. Check that the parameters are spelled correctly and that the document has a valid syntax.

Issue 1007​

The hostname provided when adding a new database is invalid and cannot be resolved. Please check that there are no typos in the hostname.

Issue 1008​

The port provided when adding a new database is not open. Please check that the port number is correct, and that the database is running and listening on that port.

Issue 1009​

The host provided when adding a new database doesn’t seem to be up. Additionally, it cannot be reached on the provided port. Please check that there are no firewall rules preventing access to the host.

Issue 1010​

Something unexpected happened, and Superset encountered an error while running a command. Please reach out to your administrator.

Issue 1011​

Something unexpected happened in the Superset backend. Please reach out to your administrator.

Issue 1012​

The user provided a username that doesn’t exist in the database. Please check that the username is typed correctly and exists in the database.

Issue 1013​

The user provided a password that is incorrect. Please check that the password is typed correctly.

Issue 1014​

Either the username provided does not exist or the password was written incorrectly. Please check that the username and password were typed correctly.

Issue 1015​

Either the database was written incorrectly or it does not exist. Check that it was typed correctly.

Issue 1016​

The schema was either removed or renamed. Check that the schema is typed correctly and exists.

Issue 1017​

We were unable to connect to your database. Please confirm that your service account has the Viewer and Job User roles on the project.

Issue 1018​

Not all parameters required to test, create, or edit a database were present. Please double check which parameters are needed, and that they are present.

Issue 1019​

Please check that the request payload has the correct format (eg, JSON).

Issue 1020​

Please check that the request payload has the expected schema.

Issue 1021​

Your instance of Superset doesn’t have a results backend configured, which is needed for asynchronous queries. Please contact an administrator for further assistance.

Issue 1022​

Only SELECT statements are allowed against this database. Please contact an administrator if you need to run DML (data manipulation language) on this database.

Issue 1023​

The last statement in a query run as CTAS (create table as select) MUST be a SELECT statement. Please make sure the last statement in the query is a SELECT.

Issue 1024​

When running a CVAS (create view as select) the query should have a single statement. Please make sure the query has a single statement, and no extra semi-colons other than the last one.

Issue 1025​

When running a CVAS (create view as select) the query should be a SELECT statement. Please make sure the query has a single statement and it’s a SELECT statement.

Issue 1026​

The submitted query might be too complex to run under the time limit defined by your Superset administrator. Please double check your query and verify if it can be optimized. Alternatively, contact your administrator to increase the timeout period.

Issue 1027​

The database might be under heavy load, running too many queries. Please try again later, or contact an administrator for further assistance.

Issue 1028​

The query contains one or more malformed template parameters. Please check your query and confirm that all template parameters are surround by double braces, for example, «<< ds >>». Then, try running your query again.

Issue 1029​

Either the schema, column, or table do not exist in the database.

Issue 1030​

The query might have a syntax error. Please check and run again.

Issue 1031​

The results from the query might have been deleted from the results backend after some period. Please re-run your query.

Issue 1032​

The query associated with the stored results no longer exists. Please re-run your query.

Issue 1033​

The query results were stored in a format that is no longer supported. Please re-run your query.

Issue 1034​

Please check that the provided database port is an integer between 0 and 65535 (inclusive).

Issue 1035​

The query was not started by an asynchronous worker. Please reach out to your administrator for further assistance.

Issue 1036​

The operation failed because the database referenced no longer exists. Please reach out to your administrator for further assistance.

Источник

DB engine Error while performing custom viz plugin in apache superset #18943

A clear and concise description of what the bug is.
I am trying to install Superset for building custom visualization using the guide at:
https://superset.apache.org/docs/contributing/creating-viz-plugins
Please note that I am attempting it on Ubuntu 20.04 VMs behind a proxy. And I am running superset on http://localhost:9000/(in dev mode)
After following all the steps successfully when I run it on 9000 port i am able to see Hello World chart but when I am trying to use this chart on dataset it shows me this error:

DB engine Error
No module named ‘superset.common.query_context_factory’
This may be triggered by:
Issue 1011 — Superset encountered an unexpected error.

How to reproduce the bug

  1. Go to ‘. ‘
  2. Click on ‘. ‘
  3. Scroll down to ‘. ‘
  4. See error

Expected results

Hello World chart working on datasets.

Actual results

After able to see Hello World plugin chart when trying to use this chart on dataset showing this error.
DB engine Error
No module named ‘superset.common.query_context_factory’
This may be triggered by:
Issue 1011 — Superset encountered an unexpected error.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

(please complete the following information):

OS: Ubuntu Server 20.04
Python on VM: 3.8.10

Checklist

Make sure to follow these steps before submitting your issue — thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.

Additional context

I have checked issue code 1011 given in apache superset documentation but not able to find my mistake where i am going wrong.

The text was updated successfully, but these errors were encountered:

Источник

DB engine Error #20968

after upgrade to superset helm 0.7.0 global filter is not working the error message is shown as below

i am connect to Bigquery and I find out when using filter with = it works. But when using in filter shown error

error message as below

and the image is shown as below

The text was updated successfully, but these errors were encountered:

Hi nightbear1009, I’m also facing same issue. Did you find any solution?
Thank you

prevent pip install elaticsearch solve my problem

Hi @venkatAkula8, I had the exact same issue. Install sqlalchemy-bigquery instead of pybigquery in the values.yaml config file. Seems like pybigquery is outdated. https://pypi.org/project/pybigquery/

Hi @Yatagani , I created a dashboard with filter and when I tried to use the filter to manipulate the dashboard, I am getting «DB engine error». We installed sqlalchemy-bigquery and uninstalled pybigquery but still we have this issue. Do we need to make any changes to the values.yaml file ?

Hi @pthirumalai,
Can you ensure that the update was successfully made and the helm chart now has the right configuration?
To upgrade chart on Kubernetes run: helm upgrade —install —values values.yaml superset superset/superset
To see if your current chart config run: helm get values superset

With these libraries there shouldn’t be any issue.

Источник

DB engine Error about superset HOT 8 OPEN

Hi nightbear1009, I’m also facing same issue. Did you find any solution?
Thank you

nightbear1009 commented on January 16, 2023

prevent pip install elaticsearch solve my problem

Yatagani commented on January 16, 2023

Hi @venkatAkula8, I had the exact same issue. Install sqlalchemy-bigquery instead of pybigquery in the values.yaml config file. Seems like pybigquery is outdated. https://pypi.org/project/pybigquery/

pthirumalai commented on January 16, 2023

Hi @Yatagani , I created a dashboard with filter and when I tried to use the filter to manipulate the dashboard, I am getting «DB engine error». We installed sqlalchemy-bigquery and uninstalled pybigquery but still we have this issue. Do we need to make any changes to the values.yaml file ?

Yatagani commented on January 16, 2023

Hi @pthirumalai,
Can you ensure that the update was successfully made and the helm chart now has the right configuration?
To upgrade chart on Kubernetes run: helm upgrade —install —values values.yaml superset superset/superset
To see if your current chart config run: helm get values superset

With these libraries there shouldn’t be any issue.

pthirumalai commented on January 16, 2023

We have installed Apache superset in Docker, How can we check whether we have configured correctly in Docker ?

saghatelian commented on January 16, 2023

Hi @pthirumalai
We also have a Docker installation.
Changing pybigquery to sqlalchemy-bigquery in docker/requirements-local.txt solved the issue for me.

pthirumalai commented on January 16, 2023

The issue got resolved after we made changes to the docker/requirements-local.txt as per your suggestion. Thanks.

  • allow_dml: true does not work from «superset import_datasources» command
  • sortby dose not work? HOT 5
  • Not able to connect SuperSet to Dremio instance
  • I want to integrate superset with Prometheus.
  • Init superset fail with error ‘No module named ‘cryptography.hazmat.backends.openssl.x509» HOT 2
  • Unable to connect to the databases HOT 1
  • apache superset automatically using wsgi HOT 1
  • Dynamically Filter not working (only happen with more than 1000 values)
  • create new image docker HOT 2
  • Getting «sub» key value as 1 from security/login response token
  • Dashboard RBAC access doesn’t conform to documentation (and access permission exposes a possible security risk) HOT 2
  • Deployment custom viz plugin hello world in superset image 2.0.0 & 2.0.1. Unexpected error: TypeError: Go.default is not a constructor HOT 3
  • DASHBOARD_CROSS_FILTERS is not enabling in Superset
  • superset-frontend not working with latest node version(18) HOT 1
  • Menu items not hiding
  • Reports are being sent multiple times HOT 6
  • Links to slack are dead HOT 2
  • shortend url for chart keeps getting updated on refresh HOT 1
  • typeError: Cannot read properties of null (reading ‘offsetHeight’)
  • [QUESTION] — Exporting dashboard / charts as PDF ? Or downloading charts as csv via API ?

Recommend Projects

React

A declarative, efficient, and flexible JavaScript library for building user interfaces.

Vue.js

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Typescript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

TensorFlow

An Open Source Machine Learning Framework for Everyone

Django

The Web framework for perfectionists with deadlines.

Laravel

A PHP framework for web artisans

Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

javascript

JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

Some thing interesting about web. New door for the world.

server

A server is a program made to process requests and deliver data to clients.

Machine learning

Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

Visualization

Some thing interesting about visualization, use data art

Some thing interesting about game, make everyone happy.

Recommend Org

Facebook

We are working to build community through open source technology. NB: members must have two-factor auth.

Microsoft

Open source projects and samples from Microsoft.

Источник

I am trying to embed a superset dashboard into a simple front-end application. However, when the embedded dashboard always throws 403: Forbidden. I am pretty sure I have set the correct permissions and everything. I even tried accessing it using admin user, still it fails.

How to reproduce the bug

The source for the application can be found here — https://github.com/adimyth/superset_embedded

superset application

Added the following configuration in superset_config.py

FEATURE_FLAGS = {"ALERT_REPORTS": True, "EMBEDDED_SUPERSET": True}

SESSION_COOKIE_SAMESITE = None
ENABLE_PROXY_FIX = True
PUBLIC_ROLE_LIKE_GAMMA = True
CORS_OPTIONS = {
    'supports_credentials': True,
    'allow_headers': ['*'],
    'resources': ['*'],
    'origins': ['http://localhost:8088', 'http://localhost:8000']
}

This gave me the following dashboard it to embed into my application
Screenshot 2022-11-29 at 2 28 54 PM

frontend application

<head>
    <script src="https://unpkg.com/@preset-sdk/embedded"></script>
    <style>
        iframe {
            height: 100%;
            width: 100%;
            border: none;
        }
    </style>
</head>
<body>
    <p id="dashboard-container"> </p>
    <script>
        // 1. Request guest_token from our backend, which runs at localhost:8000 by default 
            async function fetchGuestTokenFromBackend() {
                let response = await fetch('http://127.0.0.1:8000/guest-token');
                let data = await response.json()
                return data
        }

        // 2. Uses Preset Embedded SDK to embed the dashboard as iFrame
        const myDashboard = presetSdk.embedDashboard({
          id: "{{ DASHBOARD_ID }}",
          supersetDomain: "{{ SUPERSET_DOMAIN }}",
          mountPoint: document.getElementById("dashboard-container"),
          fetchGuestToken: () => fetchGuestTokenFromBackend(),
          dashboardUiConfig: { hideTitle: true, hideChartControls: true}
        });
    </script>
</body>

The frontend simply calls the /guest-token from backend and passes it to the presetSdk.embedDashboard

backend application

The /guest-token endpoint simply calls 2 methods from the helper (superset.py) file

@app.get("/guest-token")
async def analytics_view(request: Request):
    access_token = superset.authenticate()
    guest_token = superset.get_guest_token_for_dashboard(
        dashboard_id=DASHBOARD_ID, access_token=access_token
    )
    return guest_token

The helper has 2 methods — authenticate() which authenticates the superset-admin user & get_guest_token_for_dashboard which is used to generate access token for the guest user

import json
import os

import requests
from dotenv import load_dotenv

load_dotenv()


URL_AUTH = os.getenv("URL_AUTH")
URL_GUEST_TOKEN = os.getenv("URL_GUEST_TOKEN")
USERNAME = os.getenv("USERNAME")
FIRST_NAMER = os.getenv("FIRST_NAMER")
LAST_NAME = os.getenv("LAST_NAME")


def authenticate(
    username="admin",
    password="admin",
):
    response = requests.post(
        "http://localhost:8088/api/v1/security/login",
        headers={
            "Content-Type": "application/json",
            "Accept": "application/json",
            "Access-Control-Allow-Origin": "http://localhost:8000",
        },
        data=json.dumps(
            {
                "username": username,
                "password": password,
                "provider": "db"
            }
        ),
    )
    return response.json()["access_token"]


def get_guest_token_for_dashboard(
    dashboard_id,
    access_token,
    username=USERNAME,
    first_name=FIRST_NAMER,
    last_name=LAST_NAME,
):
    response = requests.post(
        URL_GUEST_TOKEN,
        data=json.dumps(
            {
                "user": {
                    "username": username,
                    "first_name": first_name,
                    "last_name": last_name,
                },
                "resources": [
                    {
                        "type": "dashboard",
                        "id": dashboard_id,
                    }
                ],
                "rls": [],
            }
        ),
        headers={
            "Authorization": "Bearer " + access_token,
            "Accept": "application/json",
            "Content-Type": "application/json",
        },
    )
    return response.json()["token"]

Finally we pass environment variables. Note that the DASHBOARD_ID matches from the screenshot above. Also note that I am passing superset-admin creds to the embedded dashboard

URL_AUTH=http://localhost:8088/api/v1/security/login
URL_GUEST_TOKEN=http://localhost:8088/api/v1/security/guest_token/
USERNAME=admin
FIRST_NAMER=Supserset
LAST_NAME=Admin
DASHBOARD_ID=b0a944b2-4ab5-47b7-a31d-c3eca4c36397
SUPERSET_DOMAIN=http://localhost:8088/

Error

When loading the frontend application which has the embedded dashboard, it returns —

{"errors": [{"message": "403 Forbidden: You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.", "error_type": "GENERIC_BACKEND_ERROR", "level": "error", "extra": {"issue_codes": [{"code": 1011, "message": "Issue 1011 - Superset encountered an unexpected error."}]}}]}

Expected results

I was expecting to see the actual dashboard in the frontend application

Actual results

Screenshot 2022-11-29 at 2 37 17 PM

What’s surprising is that after decoding the guest token, we can clearly see that the user is superset admin & has access to the dashboard 🤯
Screenshot 2022-11-29 at 2 39 15 PM

Environment

(please complete the following information):

  • browser type and version: Chrome
  • superset version: Built from the latest code as of 29th Nov
  • python version: 3.9
  • node.js version: NA
  • any feature flags active: {"ALERT_REPORTS": True, "EMBEDDED_SUPERSET": True}

Checklist

Make sure to follow these steps before submitting your issue — thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven’t found one similar.
1000 The datasource is too large to query. It’s likely your datasource has grown too large to run the current query, and is timing out. You can resolve this by reducing the size of your datasource or by modifying your query to only process a subset of your data. 1001 The database is under an unusual load. Your query may have timed out because of unusually high load on the database engine. You can make your query simpler, or wait until the database is under less load and try again. 1002 The database returned an unexpected error. Your query failed because of an error that occurred on the database. This may be due to a syntax error, a bug in your query, or some other internal failure within the database. This is usually not an issue within Superset, but instead a problem with the underlying database that serves your query. 1003 There is a syntax error in the SQL query. Perhaps there was a misspelling or a typo. Your query failed because of a syntax error within the underlying query. Please validate that all columns or tables referenced within the query exist and are spelled correctly. 1004 The column was deleted or renamed in the database. Your query failed because it is referencing a column that no longer exists in the underlying datasource. You should modify the query to reference the replacement column, or remove this column from your query. 1005 The table was deleted or renamed in the database. Your query failed because it is referencing a table that no longer exists in the underlying database. You should modify your query to reference the correct table. 1006 One or more parameters specified in the query are missing. Your query was not submitted to the database because it’s missing one or more parameters. You should define all the parameters referenced in the query in a valid JSON document. Check that the parameters are spelled correctly and that the document has a valid syntax. 1007 The hostname provided can’t be resolved. The hostname provided when adding a new database is invalid and cannot be resolved. Please check that there are no typos in the hostname. 1008 The port is closed. The port provided when adding a new database is not open. Please check that the port number is correct, and that the database is running and listening on that port. 1009 The host might be down, and cannot be reached on the provided port. The host provided when adding a new database doesn’t seem to be up. Additionally, it cannot be reached on the provided port. Please check that there are no firewall rules preventing access to the host. 1010 Superset encountered an error while running a command. Something unexpected happened, and Superset encountered an error while running a command. Please reach out to your administrator. 1011 Superset encountered an unexpected error. Something unexpected happened in the Superset backend. Please reach out to your administrator. 1012 The username provided when connecting to a database is not valid. The user provided a username that doesn’t exist in the database. Please check that the username is typed correctly and exists in the database. 1013 The password provided when connecting to a database is not valid. The user provided a password that is incorrect. Please check that the password is typed correctly. 1014 Either the username or the password used are incorrect. Either the username provided does not exist or the password was written incorrectly. Please check that the username and password were typed correctly. 1015 Either the database is spelled incorrectly or does not exist. Either the database was written incorrectly or it does not exist. Check that it was typed correctly. 1016 The schema was deleted or renamed in the database. The schema was either removed or renamed. Check that the schema is typed correctly and exists. 1017 The user doesn’t have the proper permissions to connect to the database We were unable to connect to your database. Please confirm that your service account has the Viewer and Job User roles on the project. 1018 One or more parameters needed to configure a database are missing. Not all parameters required to test, create, or edit a database were present. Please double check which parameters are needed, and that they are present. 1019 The submitted payload has the incorrect format. Please check that the request payload has the correct format (eg, JSON). 1020 The submitted payload has the incorrect schema. Please check that the request payload has the expected schema. 1021 Results backend needed for asynchronous queries is not configured. Your instance of Superset doesn’t have a results backend configured, which is needed for asynchronous queries. Please contact an administrator for further assistance. 1022 Database does not allow data manipulation. Only SELECT statements are allowed against this database. Please contact an administrator if you need to run DML (data manipulation language) on this database. 1023 CTAS (create table as select) doesn’t have a SELECT statement at the end. The last statement in a query run as CTAS (create table as select) MUST be a SELECT statement. Please make sure the last statement in the query is a SELECT. 1024 CVAS (create view as select) query has more than one statement. When running a CVAS (create view as select) the query should have a single statement. Please make sure the query has a single statement, and no extra semi-colons other than the last one. 1025 CVAS (create view as select) query is not a SELECT statement. When running a CVAS (create view as select) the query should be a SELECT statement. Please make sure the query has a single statement and it’s a SELECT statement. 1026 Query is too complex and takes too long to run. The submitted query might be too complex to run under the time limit defined by your Superset administrator. Please double check your query and verify if it can be optimized. Alternatively, contact your administrator to increase the timeout period. 1027 The database is currently running too many queries. The database might be under heavy load, running too many queries. Please try again later, or contact an administrator for further assistance. 1028 One or more parameters specified in the query are malformatted. The query contains one or more malformed template parameters. Please check your query and confirm that all template parameters are surround by double braces, for example, «{{ ds }}». Then, try running your query again. 1029 The object does not exist in this database. Either the schema, column, or table do not exist in the database. 1030 The query potentially has a syntax error. The query might have a syntax error. Please check and run again. 1031 The results backend no longer has the data from the query. The results from the query might have been deleted from the results backend after some period. Please re-run your query. 1032 The query associated with the results was deleted. The query associated with the stored results no longer exists. Please re-run your query. 1033 The results stored in the backend were stored in a different format, and no longer can be deserialized. The query results were stored in a format that is no longer supported. Please re-run your query. 1034 The database port provided is invalid. Please check that the provided database port is an integer between 0 and 65535 (inclusive). 1035 Failed to start remote query on a worker. The query was not started by an asynchronous worker. Please reach out to your administrator for further assistance. 1036 The database was deleted. The operation failed because the database referenced no longer exists. Please reach out to your administrator for further assistance.

Понравилась статья? Поделить с друзьями:
  • Iss ошибка 500
  • Isql error could not sqlexecute
  • Isql error could not sqlconnect
  • Ispring free cam ошибка экспорта
  • Ispring free cam ошибка initialize