• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

OSError: [WinError 17] impossible to move file

New Here ,
Dec 31, 2021 Dec 31, 2021

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

TOPICS
PDF Services API

Views

720

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

New Here , Dec 31, 2021 Dec 31, 2021

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

Votes

Translate

Translate
New Here ,
Dec 31, 2021 Dec 31, 2021

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

LATEST

Hey, anxiety and mouth problems have paralyzed my efforts. Hell yes

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources