Copy link to clipboard
Copied
Hello,
I get a OSError: [WinError 17] impossible to move file while trying to extract text from pdf.
Here's the output from VSCode:
INFO:adobe.pdfservices.operation.pdfops.extract_pdf_operation:All validations successfully done. Beginning ExtractPDF operation execution
INFO:adobe.pdfservices.operation.pdfops.extract_pdf_operation:Extract Operation Successful - Transaction ID: mzOTh1xDTJpUOhSDxX5FlL2Cv6lKeS1Z
INFO:adobe.pdfservices.operation.internal.io.file_ref_impl:Moving file at C:\Users\zepef\AppData\Local\Temp\extractSdkResult\49fb0eb16a5911ecb66ec0b88376b18c.zip to target e:\LocalRepos\Projects\kgc-book-club\pdfservices-python-sdk-samples/output/ExtractTextInfoFromPDF.zip
Traceback (most recent call last):
File "e:\LocalRepos\Projects\kgc-book-club\pdfservices-python-sdk-samples\src\extractpdf\extract_txt_from_pdf.py", line 51, in <module>
result.save_as(base_path + "/output/ExtractTextInfoFromPDF.zip")
File "C:\Users\zepef\anaconda3\envs\kgc-bc\lib\site-packages\adobe\pdfservices\operation\internal\io\file_ref_impl.py", line 45, in save_as
os.rename(self._file_path, abs_path)
OSError: [WinError 17] Impossible de déplacer le fichier vers un lecteur de disque différent: 'C:\\Users\\zepef\\AppData\\Local\\Temp\\extractSdkResult\\49fb0eb16a5911ecb66ec0b88376b18c.zip' -> 'e:\\LocalRepos\\Projects\\kgc-book-club\\pdfservices-python-sdk-samples\\output\\ExtractTextInfoFromPDF.zip'
Any suggestion would be much appreciated.
Thanx,
PEF
I am responding to my own question a few hours before 2022, strange isn't it ?
The only way I found to have it to work was to move my entire project on c: drive. os.rename() does not let you move files around drives you have to use shutils instead. I am not allowed (yet) to modify Adobe's (excellent) code 😉
Happy new year !!!
PEF
Copy link to clipboard
Copied
I am responding to my own question a few hours before 2022, strange isn't it ?
The only way I found to have it to work was to move my entire project on c: drive. os.rename() does not let you move files around drives you have to use shutils instead. I am not allowed (yet) to modify Adobe's (excellent) code 😉
Happy new year !!!
PEF
Copy link to clipboard
Copied