I am creating an attachment table linking attachments from my local PC, saved in "C:\Temp\Match" to a Featureclass housed in a SDE Database on our GIS Server.
I can run the GenerateAttachmentMatchTable Tool from within ArcGIS and run it multiple times with no issue. The problem comes in when I try and run the tool from within a Python Script. I keep getting an Error:
ExecuteError: ERROR 000090: Error creating table, workspace may be read-only.
The folders are not read-only, I have checked and even changed the location of the output. The script has been modified and copied from the Geoprocessing Results Window and modified to be acceptable to a stand-alone script. Please see the code below:
import arcpy
InFeat = "Database Connections/xxx/_Enviro.DBO.MonPnt"
AttFolder = "C:\\temp\\Match1\\JPG"
OutTable = "C:\\temp\\Match1\\MatchTable"
LinkF = "Name"
arcpy.GenerateAttachmentMatchTable_management(in_dataset= InFeat, in_folder=AttFolder, out_match_table=OutTable, in_key_field=LinkF, in_file_filter="", in_use_relative_paths="RELATIVE")
The folder in question is not read-only and in fact has just been created to test this. There are no ArcMap documents linked to this folder, it only contains from images and a few text files I used to run some checks elsewhere in the script.
Running windows 7, 64-bit and ArcMap 10.4.1
Database Connections
shortcut available from ArcMap. Go forr'C:\GISData\my.sde\enviro.dbo.monpnt'
and see what happens.