laptop and a wrench

Bug

The error message, "PermissionError: [Errno 13] Permission denied:" is returned when running a Python script to convert a file geodatabase to a ZIP file.

Last Published: January 6, 2022 ArcGIS Pro
Bug ID Number BUG-000145328
SubmittedDecember 16, 2021
Last ModifiedMarch 28, 2025
Applies toArcGIS Pro
Version found2.7
Operating SystemWindows OS
Operating System Version10.0 64 Bit
StatusWill Not Be Addressed

Additional Information

The .lock files are required for data access optimization. There is no reason to write .lock files into an archive. It is easy to update the code to accomplish this. In the innermost loop just before zipf.write, type `if os.path.splitext(file)[1] == ".lock": continue`.

Workaround

  1. Run the script in the Python window or in ArcGIS Notebooks within ArcGIS Pro.
  2. Create the geodatabase within a separate process from the script to release the lock when the process closes.
  3. Zip the file within the same script.

Steps to Reproduce

Bug ID: BUG-000145328

Software:

  • ArcGIS Pro

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options