-
Notifications
You must be signed in to change notification settings - Fork 2.8k
fix: Fix the parameter issue of the str.format(...) method
#5119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -264,7 +264,7 @@ def is_valid_model_params(self): | |
| node.properties.get('node_data', {})['model_params_setting'] = model_params_setting | ||
| if node.properties.get('status', 200) != 200: | ||
| raise ValidationError( | ||
| ErrorDetail(_("Node {node} is unavailable").format(node.properties.get("stepName")))) | ||
| ErrorDetail(_("Node {node} is unavailable").format(node=node.properties.get("stepName")))) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 未指定参数名 |
||
| node_list = [node for node in self.nodes if (node.type == 'function-lib-node')] | ||
| for node in node_list: | ||
| function_lib_id = node.properties.get('node_data', {}).get('function_lib_id') | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,7 +81,7 @@ def execute(self, **kwargs) -> NodeResult: | |
| return NodeResult({'document_list': document_list, 'source_url': source_url, 'selector': selector}, | ||
| self.workflow_manage.params.get('knowledge_base') or {}) | ||
| maxkb_logger.error(_('data source web node:{node_id} error{error}{traceback}').format( | ||
| knowledge_id=node_id, error=str(e), traceback=traceback.format_exc())) | ||
| node_id=node_id, error=str(e), traceback=traceback.format_exc())) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 参数名错误,正确的是 |
||
|
|
||
| def get_details(self, index: int, **kwargs): | ||
| return { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,9 +116,9 @@ def embedding_by_knowledge(knowledge_id, model_id): | |
| pass | ||
| except Exception as e: | ||
| maxkb_logger.error( | ||
| _('Vectorized knowledge: {knowledge_id} error {error} {traceback}'.format(knowledge_id=knowledge_id, | ||
| _('Vectorized knowledge: {knowledge_id} error {error} {traceback}').format(knowledge_id=knowledge_id, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. format方法,在 |
||
| error=str(e), | ||
| traceback=traceback.format_exc()))) | ||
| traceback=traceback.format_exc())) | ||
| finally: | ||
| maxkb_logger.info(_('End--->Vectorized knowledge: {knowledge_id}').format(knowledge_id=knowledge_id)) | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
避免报空