python-docx2txt icon indicating copy to clipboard operation
python-docx2txt copied to clipboard

text = docx2txt.process("file.docx", "/tmp/img_dir") File not found

Open Charlie77-E opened this issue 2 years ago • 1 comments

I have the following script:

import docx2txt

input_loc = input("Your docx location: ") output_loc = input("Output location: ")

text = docx2txt.process(input_loc.split('"')[1], output_loc.split('"')[1])

Where the input is: Your docx location: "C:\Users\Public\Documents\DV_Test_Report_-_Test_Plan.docx" Output location: "C:\Users\Public\Pictures\Temp_Images"

is showing the following error:

Traceback (most recent call last): File "C:/Users/cca/Downloads/TestImages.py", line 6, in text = docx2txt.process(input_loc.split('"')[1], output_loc.split('"')[1]) File "C:\Python\lib\site-packages\docx2txt\docx2txt.py", line 103, in process with open(dst_fname, "wb") as dst_f: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\Public\Pictures\Temp_Images\image1.png'

Charlie77-E avatar Aug 22 '22 20:08 Charlie77-E

same issue

beginner-cryptonyx avatar Oct 30 '22 07:10 beginner-cryptonyx