Skip to content

Commit

Permalink
fix:A string literal cannot contain NULL (0x00) characters
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxinbiao committed Mar 20, 2024
1 parent b34db0f commit 41730a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pypi/data-processing/src/file_handle/pdf_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def handle(
all_document_for_process = []
for document in documents:
chunck_id = ulid.ulid()
content = document.page_content.replace("\n", "")
content = document.page_content.replace("\n", "").replace("\x00", "")
chunk_insert_item = {
"id": chunck_id,
"document_id": self._document_id,
Expand Down
2 changes: 1 addition & 1 deletion pypi/data-processing/src/file_handle/web_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def web_manipulate(
all_document_for_process = []
for document in documents:
chunck_id = ulid.ulid()
content = document.page_content.replace("\n", "")
content = document.page_content.replace("\n", "").replace("\x00", "")
chunk_insert_item = {
"id": chunck_id,
"document_id": document_id,
Expand Down
2 changes: 1 addition & 1 deletion pypi/data-processing/src/file_handle/word_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def docx_manipulate(
all_document_for_process = []
for document in documents:
chunck_id = ulid.ulid()
content = document.page_content.replace("\n", "")
content = document.page_content.replace("\n", "").replace("\x00", "")
chunk_insert_item = {
"id": chunck_id,
"document_id": document_id,
Expand Down

0 comments on commit 41730a6

Please sign in to comment.