Skip to main content
Question

fme.exe is using a file from Python Startup Script - crashes the script

  • May 24, 2024
  • 1 reply
  • 49 views

robertr
Contributor
Forum|alt.badge.img+6

Hello,
I have a situation that I cannot seem to understand.
It seems that fme.exe is locking/using a file that I try to rename in the Startup Script, although that file is not used at all in the workspace (the processing where the file gets created/saved/renamed is happening in the startup script).

The logs don’t mention this file/folder as being used at all.
i don’t have the file open in any other app, closed everything else except FME.

This is happening on windows. 

 

Logs say:

2024-05-24 11:32:20|  18.7| 18.5|INFORM|15160 fme.exe is using C:\Users\myuser\Documents\DataProject\CAFile\dtCA.xlsx

2024-05-24 11:32:20|  19.1|  0.0|ERROR |Python Exception <PermissionError>: [WinError 32] The process cannot access the file because it is being used by another process: ‘C:\Users\myuser\Documents\DataProject\CAFile\dtCA.xlsx’

 

The interesting thig is that on another machine with the exact same setup (both for python and fme) it does work without any issues. I checked the debug file for both, the output is exactly the same up to this point except the FME license key and machine details.

Later Edit:
It seems that the issue is that from inside the startup script, it cannot remove/rename the excel files. If i run this from Visual Studio or the terminal, it does work.

So now I am somehow unsure why from within FMEs Startup Scrip the rename/remove doesn’t work, and how can I fix this?

If anyone knows why I keep getting this, please advise. Thank you!

1 reply

david_r
Evangelist
  • May 24, 2024

It would be helpful if you could post your script here.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings