Forum

Author Topic: OSError: file used by another process  (Read 4242 times)

Wizyza

  • Newbie
  • *
  • Posts: 26
    • View Profile
OSError: file used by another process
« on: January 08, 2024, 07:34:12 PM »
Hello everyone,

I've been running into an issue while running my automated workflow. Occasionally, processing will halt and the following error will show up in the console:

OSError: Can't replace file or directory: The process cannot access the file because it is being used by another process (32): PathToProject/ProjectName.files/99/0/depth_maps/data_unfiltered1.zip

I'm running Windows 11 22H2. I think I started having this issue with Metashape v.2.0.4. Has anyone else run into this problem? I've been using the same computer for some time with the same script and no other applications are running on the computer during processing. Metashape and the project files are local.

Thanks!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15424
    • View Profile
Re: OSError: file used by another process
« Reply #1 on: January 12, 2024, 03:36:39 PM »
Hello Wizyza,

It could be some synchronization&backup service that is indexing the contents of the project files directory. If it is the case, try to turn off such services and check, if the issue no longer persists.

Alternatively, you can try to use utilities that are able to check what processes are accessing what files.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Wizyza

  • Newbie
  • *
  • Posts: 26
    • View Profile
Re: OSError: file used by another process
« Reply #2 on: January 22, 2024, 09:40:37 PM »
Thank you, Alexey.

My images are stored on a network drive,but my project files are stored locally. Would the remote storage of the images be the source of the problem?

Thanks again.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15424
    • View Profile
Re: OSError: file used by another process
« Reply #3 on: January 23, 2024, 05:30:50 PM »
Hello Wizyza,

According to the system message, the problem is related to the files within project folder.

Can you check, if there are any backup&synchronization services running in the background?

There is Process Monitor tool that should allow to find out, which processes are using certain file:
https://learn.microsoft.com/en-us/sysinternals/downloads/procmon
Best regards,
Alexey Pasumansky,
Agisoft LLC