You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "sebint (via GitHub)" <gi...@apache.org> on 2024/03/25 08:17:20 UTC

[I] Superset init without example data, throws code 500 in sqltab page due to no database found [superset]

sebint opened a new issue, #27633:
URL: https://github.com/apache/superset/issues/27633

   ### Bug description
   
   I have cleared the database and init superset with roles and permissions and did not load the sample data as I wanted to start fresh.
   When I clicked SQL Lab, I got the error` "Unable to add a new tab to the backend. Please contact your administrator."`.
   
   And I looked at the network tab the API for `api/v1/tabstateview/` was throwing 500 due to `'dbId'` is not found.
   
   ```
   addQueryEditor({
           dbId: dbId || defaultDbId || firstDbId,
           schema: schema ?? null,
           autorun: autorun ?? false,
           sql: `${warning}SELECT ...`,
           queryLimit: queryLimit || common.conf.DEFAULT_SQLLAB_LIMIT,
           name,
   }),
   ```
   
   When I changed the code as below I was able to create a tab in SQL Lab.
   
   ```
   addQueryEditor({
           dbId: (dbId || defaultDbId || firstDbId) ?? null,
           schema: schema ?? null,
           autorun: autorun ?? false,
           sql: `${warning}SELECT ...`,
           queryLimit: queryLimit || common.conf.DEFAULT_SQLLAB_LIMIT,
           name,
   }),
   ```
   What is the right approach? 
   
   1. Show the `DatabaseModal` if no database ids are found?
   2. Display the new tab with no database in the right Panel?
   
   
   ### How to reproduce the bug
   
   1. Init Superset with no example data.
   2. Click on SQL Lab
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.


-- 
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


Re: [I] Superset init without example data, throws code 500 in sqltab page due to no database found [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina commented on issue #27633:
URL: https://github.com/apache/superset/issues/27633#issuecomment-2305378002

   Fixed by https://github.com/apache/superset/pull/29993.


-- 
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


Re: [I] Superset init without example data, throws code 500 in sqltab page due to no database found [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #27633:
URL: https://github.com/apache/superset/issues/27633#issuecomment-2256594075

   I can't help but wonder if this is related to:
   https://github.com/apache/superset/issues/29694


-- 
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


Re: [I] Superset init without example data, throws code 500 in sqltab page due to no database found [superset]

Posted by "michael-s-molina (via GitHub)" <gi...@apache.org>.
michael-s-molina closed issue #27633: Superset init without example data, throws code 500 in sqltab page due to no database found
URL: https://github.com/apache/superset/issues/27633


-- 
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


Re: [I] Superset init without example data, throws code 500 in sqltab page due to no database found [superset]

Posted by "str8edgedave (via GitHub)" <gi...@apache.org>.
str8edgedave commented on issue #27633:
URL: https://github.com/apache/superset/issues/27633#issuecomment-2253553545

   I have just completed a clean installation of Superset 4.0.2 on Fedora 40, using Postgres as the Metadata database and I am seeing this issue as well.
   
   When I added in the example data and then deleted it, the problem went away.


-- 
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