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

   A clear and concise description of what the bug is.
   
   #### How to reproduce the bug
   
   Observe that the import in 
[bigqeuery.py](https://github.com/apache/superset/blob/067bfbf950b0ee5381a430f6a0f9832d24157d95/superset/db_engine_specs/bigquery.py#L51)
 results in a `ModuleNotFoundError`. 
   
   ```
   >>> from google.cloud import bigquery
   Traceback (most recent call last):
     File "<string>", line 1, in <module>
   ModuleNotFoundError: No module named 'google.cloud'
   ```
   
   Install `google-cloud-core`, or any Google SDK which depends on it (except 
BigQuery):
   
       pip install google-cloud-core
   
   Observe that now the exception has changed to the higher-level `ImportError`:
   
   ```
   >>> from google.cloud import bigquery
   Traceback (most recent call last):
     File "<stdin>", line 1, in <module>
   ImportError: cannot import name 'bigquery' from 'google.cloud' (unknown 
location)
   ```
   
   ### Expected results
   
   Missing import exception is caught and Superset loads correctly when Google 
SDKs have been installed but without BigQuery.
   
   ### Actual results
   
   Missing import exception is not caught, Superset doesn't load and emits the 
following error:
   
   ```json
   {"errors": [{"message": "cannot import name 'bigquery' from 'google.cloud' 
(unknown location)", "error_type": "GENERIC_BACKEND_ERROR", "level": "error", 
"extra": {"issue_codes": [{"code": 1011, "message": "Issue 1011 - Superset 
encountered an unexpected error."}]}}]}
   ```
   
   
   ### Environment
   
   - superset version: `Superset 0.0.0-dev`, git commit ff95d0fac
   - python version: `Python 3.11.4`
   - node.js version: `v18.13.0`
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version 
of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't 
found one similar.
   


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

Reply via email to