Aspose-words run in flask error

I use flask,and write a interface,code:

def scale_images_in_docx(file_path):
    document = aw.Document(file_path)
    paragraphs = document.get_child_nodes(aw.NodeType.PARAGRAPH, True)
    for paragraph in paragraphs:
        print(paragraph.as_paragraph().get_text())

@extra_interface.route("/submit1", methods=['POST'])
def document_extra1():
    scale_images_in_docx("D:/project/python_project/kai-wis/kai_wis_ai_backend/4月17号会议待办.docx")
    return {'name':'1'}                 

then I create a post request in postman,but run error,Terminal just print “进程已结束,退出代码为 -1073741819 (0xC0000005)”

any docx documents would cause this error,python=3.8.12,aspose-words=24.10.0.Use ,aspose-words=24.4.0 don’t have this error

just run in http request has this error,run in main func normal

@David_Matin Unfortunately, the error does not give any useful information for analysis. It is hard to say what might cause it. Probably the following might be useful for you:
https://juejin.cn/post/7345129748005945378

@alexey.noskov But why can run in aspose-words=24.4.0 :sob:

@David_Matin Unfortunately, it is hard to say. If possible, please provide more information - stack trace of the exception, logs etc.

1 Like