mirror of
https://github.com/langgenius/dify.git
synced 2026-04-30 21:58:00 +08:00
fix
This commit is contained in:
parent
04d3abd754
commit
e401d917ac
@ -50,7 +50,7 @@ class WordExtractor(BaseExtractor):
|
|||||||
|
|
||||||
self.web_path = self.file_path
|
self.web_path = self.file_path
|
||||||
# TODO: use a better way to handle the file
|
# TODO: use a better way to handle the file
|
||||||
self.temp_file = tempfile.NamedTemporaryFile()
|
self.temp_file = tempfile.NamedTemporaryFile() # noqa: SIM115
|
||||||
self.temp_file.write(r.content)
|
self.temp_file.write(r.content)
|
||||||
self.file_path = self.temp_file.name
|
self.file_path = self.temp_file.name
|
||||||
elif not os.path.isfile(self.file_path):
|
elif not os.path.isfile(self.file_path):
|
||||||
@ -228,7 +228,7 @@ class WordExtractor(BaseExtractor):
|
|||||||
if x.tag.endswith("instrText"):
|
if x.tag.endswith("instrText"):
|
||||||
for i in url_pattern.findall(x.text):
|
for i in url_pattern.findall(x.text):
|
||||||
hyperlinks_url = str(i)
|
hyperlinks_url = str(i)
|
||||||
except Exception as e:
|
except Exception:
|
||||||
logger.exception("Failed to parse HYPERLINK xml")
|
logger.exception("Failed to parse HYPERLINK xml")
|
||||||
|
|
||||||
def parse_paragraph(paragraph):
|
def parse_paragraph(paragraph):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user