diff --git a/dbm-ui/backend/core/storages/handlers.py b/dbm-ui/backend/core/storages/handlers.py index 5d473fd695..03184eb009 100644 --- a/dbm-ui/backend/core/storages/handlers.py +++ b/dbm-ui/backend/core/storages/handlers.py @@ -65,7 +65,7 @@ def batch_fetch_file_content(self, file_path_list: List[str]) -> List[Dict[str, file_content_list.append( { "path": unzip_file_name, - "content": unzip_files.read(unzip_file_name).decode("utf-8"), + "content": unzip_files.read(unzip_file_name).decode("utf-8", errors="replace"), "url": self.storage.url(unzip_file_name), } ) diff --git a/dbm-ui/backend/db_services/mysql/constants.py b/dbm-ui/backend/db_services/mysql/constants.py index e25898366c..560bda7bc6 100644 --- a/dbm-ui/backend/db_services/mysql/constants.py +++ b/dbm-ui/backend/db_services/mysql/constants.py @@ -27,4 +27,6 @@ ) # 根据库名查询表名的sql语句 -QUERY_TABLES_FROM_DB_SQL = "select table_schema, table_name from information_schema.tables where {db_sts}" +QUERY_TABLES_FROM_DB_SQL = ( + "select table_schema as table_schema, table_name as table_name from information_schema.tables where {db_sts}" +)