Skip to content

[Question]: parsing document API interface is called again, an error will be reported: Can't stop parsing document with progress at 0 or 100 #6312

Closed
@SendDreams

Description

@SendDreams

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Non-english title submitions will be closed directly ( 非英文标题的提交将会被直接关闭 ) (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Describe your problem

In the source code, if the parsing interface is not equal to 0, this error will be reported. It should be stopped from parsing first and set to 0

source code:
if doc[0].progress != 0.0:
return get_error_data_result(
"Can't stop parsing document with progress at 0 or 100"
)

However, the stop interface made an extra judgment on a 100% situation, which led to the inability to stop the completed parsing, and thus it could not be re-parsed.

source code:
if int(doc[0].progress) == 1 or doc[0].progress == 0:
return get_error_data_result(
"Can't stop parsing document with progress at 0 or 1"
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions