Skip to content
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

combine word document function exception #63

Open
weike32 opened this issue Feb 1, 2021 · 0 comments
Open

combine word document function exception #63

weike32 opened this issue Feb 1, 2021 · 0 comments

Comments

@weike32
Copy link

weike32 commented Feb 1, 2021

I find this answer
stackoverflow

But In my situation:

when i use this function

def combine_all_docx(filename_master,files_list):
    number_of_sections=len(files_list)
    master = Document_compose(filename_master)
    composer = Composer(master)
    for i in range(0, number_of_sections):
        doc_temp = Document_compose(files_list[i])
        composer.append(doc_temp)
    composer.save("combined_file.docx")
combine_word_documents(files)

#For Example
filename_master="file1.docx"
files_list=["file2.docx","file3.docx","file4.docx",file5.docx"]
#Calling the function
combine_all_docx(filename_master,files_list)

In the debug mode, this is ok. but When I installer the program. i get this exception:

[Errno 2] No such file or directory: 'C:\\Users\\youName\\AppData\\Local\\Temp\\_MEI168082\\docxcompose\\templates\\custom.xml'

My virtual environment is anacanda3,and i find this file(custom.xml) in this location(F:\Anaconda3\Lib\site-packages\docxcompose\tempaltes\custom.xml), and i guess there were some problems when I installer .py, so program couldn't read the file.

How to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant