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

   ### Bug description
   
   ##Issue Description
   
   #### I'm using version 3.1.1
   
![image](https://github.com/apache/superset/assets/1631375/a29279a5-5918-4e5c-9602-1ea64c828ca7)
   
   #### When I have superset configured in English, I can load tables, preview, 
and execute SQL without problems
   
![image](https://github.com/apache/superset/assets/1631375/ad7fe566-8059-4a0c-a3cb-686a4eeeb1c4)
   
   #### When I switch to Portuguese language, I start getting `not enough 
arguments for format string` error in preview or any sql execution
   <table><tr>
   <td> <img 
src="https://github.com/apache/superset/assets/1631375/d050d45f-ae32-4a42-bab0-b5eb686cf22f"/>
 </td>
   <td> <img 
src="https://github.com/apache/superset/assets/1631375/af7ca401-fcbb-4a4b-8d0b-a114c4b90976"/>
 </td>
   </tr></table>
   
   ### Log
   
   ``` shell
   2024-03-02 00:39:11 Query 75: Executing 1 statement(s)
   2024-03-02 00:39:11 2024-03-02 08:39:11,948:INFO:superset.sql_lab:Query 75: 
Executing 1 statement(s)
   2024-03-02 00:39:11 Query 75: Set query to 'running'
   2024-03-02 00:39:11 2024-03-02 08:39:11,948:INFO:superset.sql_lab:Query 75: 
Set query to 'running'
   2024-03-02 00:39:12 SupersetErrorsException
   2024-03-02 00:39:12 Traceback (most recent call last):
   2024-03-02 00:39:12   File 
"/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in 
full_dispatch_request
   2024-03-02 00:39:12     rv = self.dispatch_request()
   2024-03-02 00:39:12   File 
"/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in 
dispatch_request
   2024-03-02 00:39:12     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py",
 line 95, in wraps
   2024-03-02 00:39:12     return f(self, *args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 127, in wraps
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 121, in wraps
   2024-03-02 00:39:12     duration, response = time_function(f, self, *args, 
**kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/utils/core.py", 
line 1463, in time_function
   2024-03-02 00:39:12     response = func(*args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 93, in wraps
   2024-03-02 00:39:12     return f(self, *args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/utils/log.py", 
line 255, in wrapper
   2024-03-02 00:39:12     value = f(*args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/sqllab/api.py", 
line 407, in execute_sql_query
   2024-03-02 00:39:12     command_result: CommandResult = command.run()
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 121, in run
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 103, in run
   2024-03-02 00:39:12     status = self._run_sql_json_exec_from_scratch()
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 161, in _run_sql_json_exec_from_scratch
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 156, in _run_sql_json_exec_from_scratch
   2024-03-02 00:39:12     return self._sql_json_executor.execute(
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/sqllab/sql_json_executer.py",
 line 111, in execute
   2024-03-02 00:39:12     raise SupersetErrorsException(
   2024-03-02 00:39:12 superset.exceptions.SupersetErrorsException: 
[SupersetError(message='not enough arguments for format string', 
error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 
'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, 
extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 
'Issue 1002 - O banco de dados retornou um erro inesperado.'}]})]
   2024-03-02 00:39:12 2024-03-02 
08:39:12,063:WARNING:superset.views.base:SupersetErrorsException
   2024-03-02 00:39:12 Traceback (most recent call last):
   2024-03-02 00:39:12   File 
"/usr/local/lib/python3.9/site-packages/flask/app.py", line 1823, in 
full_dispatch_request
   2024-03-02 00:39:12     rv = self.dispatch_request()
   2024-03-02 00:39:12   File 
"/usr/local/lib/python3.9/site-packages/flask/app.py", line 1799, in 
dispatch_request
   2024-03-02 00:39:12     return 
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/flask_appbuilder/security/decorators.py",
 line 95, in wraps
   2024-03-02 00:39:12     return f(self, *args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 127, in wraps
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 121, in wraps
   2024-03-02 00:39:12     duration, response = time_function(f, self, *args, 
**kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/utils/core.py", 
line 1463, in time_function
   2024-03-02 00:39:12     response = func(*args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/views/base_api.py",
 line 93, in wraps
   2024-03-02 00:39:12     return f(self, *args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/utils/log.py", 
line 255, in wrapper
   2024-03-02 00:39:12     value = f(*args, **kwargs)
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/sqllab/api.py", 
line 407, in execute_sql_query
   2024-03-02 00:39:12     command_result: CommandResult = command.run()
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 121, in run
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 103, in run
   2024-03-02 00:39:12     status = self._run_sql_json_exec_from_scratch()
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 161, in _run_sql_json_exec_from_scratch
   2024-03-02 00:39:12     raise ex
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/commands/sql_lab/execute.py",
 line 156, in _run_sql_json_exec_from_scratch
   2024-03-02 00:39:12     return self._sql_json_executor.execute(
   2024-03-02 00:39:12   File 
"/app/superset_home/.local/lib/python3.9/site-packages/superset/sqllab/sql_json_executer.py",
 line 111, in execute
   2024-03-02 00:39:12     raise SupersetErrorsException(
   2024-03-02 00:39:12 superset.exceptions.SupersetErrorsException: 
[SupersetError(message='not enough arguments for format string', 
error_type=<SupersetErrorType.GENERIC_DB_ENGINE_ERROR: 
'GENERIC_DB_ENGINE_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, 
extra={'engine_name': 'PostgreSQL', 'issue_codes': [{'code': 1002, 'message': 
'Issue 1002 - O banco de dados retornou um erro inesperado.'}]})]
   ```
   
   ### How to reproduce the bug
   
   1. Go to SQL Lab
   2. Make sure you can preview or execute SQL statement
   3. Change Language, I used Portuguese BR
   4. Reload page
   5. Neither preview or SQL execution works
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   3.1.1
   
   ### Python version
   
   3.9
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Firefox
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [X] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [X] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [X] 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-unsubscr...@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to