Skip to content

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

Description

@Charlie77-E

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'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions