Error in arcpy.OSMGPFileLoader_osmtools(...)

May 11, 2012 at 10:16 AM


I stumbled over the following error, which appears from time to time. I could not identify the reason why it sometimes appears and somtimes doesnt using the same data. Might looking into the folder, where I create the gbds, during runtime be the reason? I never opened the used gdb (workspace) in Windows Explorer or Arcgis during runtime. 

I use the editor in version 2.0.67 (I know its a late beta, but I need to keep it, due to having same procedures for data comparison). 

Traceback (most recent call last):  File "", line 3100, in <module>    arcpy.OSMGPFileLoader_osmtools(OSMDataInput, "CONSERVE_MEMORY", nameOfDataset, nameOfPointFeatureClassTemp, nameOfLineFeatureClassTemp, nameOfPolygonFeatureClassTemp) 

File "C:\Program Files (x86)\ESRI\OSMEditor\data\OpenStreetMap Toolbox.tbx", line 282, in OSMGPFileLoader
arcgisscripting.ExecuteError: Workspace or data source is read only. [The C:\Daten Tilo\Diplomarbeit\Software_USE\Analysen\1_OSM_Daten\osm2use\GDBs\rv20110815.gdb workspace is read only.]   bei ESRI.ArcGIS.Geodatabase.IFeatureClass.Update(IQueryFilter filter, Boolean Recycling)   bei ESRI.ArcGIS.OSM.GeoProcessing.OSMGPFileLoader.Execute(IArray paramvalues, ITrackCancel TrackCancel, IGPEnvironmentManager envMgr, IGPMessages message)Failed to execute (OSMGPFileLoader).


"The" just in front of the path seems strange. ???




May 15, 2012 at 6:03 PM

Hello Tilo,

Thanks for providing the error. To make sure I understand: when you use the Load OSM File tool, sometimes you get this error and sometimes it works without problems, correct?  And there is nothing different about the location of the workspace when you get the error - it is in the same folder location (and hence the same permissions with no directories marked as read-only) as when the tool runs successfully, correct?


May 29, 2012 at 1:29 AM

Hello Christine,

yes, both correct. I ran the tool via script in exactly the same way  in a constant folderstructure about 25 times with just slightly different data (about 600MB).  3 or 4 times it failed with the error above but worked fine in the following attempt with the same parameters. I am not sure if I restarted the system (win7/64) every time. I definately restarted sometimes. Hope this helps. 


Oct 5, 2012 at 10:21 AM
Edited Oct 5, 2012 at 10:25 AM


I experienced a same problem and I think I can provide a clue. It is related in some way to a size of the processed file. I have been trying to import local OSM data (6GB file of Czech Republic data).

At first I had to change slightly toolbox to read OSM from file instead of download it (there was some issue with number of nodes) so I substituted Download OSM data tool for Load OSM Data tool.

I have tried modified tool on four sample areas so far.

  1. 6GB OSM file of Czech Republic (CR)
  2. 703MB an extracted region of 6GB CR
  3. Two smaller extracted region 28MB and 47MB of a same size of area but different extents.

When I used modified toolbox Download, Extract and Symbolize to load OSM data into GDB, there were three different results of the process. 

Result 1:

The sample 3) are always successfully processed. I’ve got my feature classes with all attributes (it includes attributes for all basic features of OSM file [Highways, Amenity, Barrier, …] and for tag values of the features).

Result 2:

The processing of the sample 2) is finished successfully only sometimes. Actually there is a lower numbered of successes than failures.

Result 3:

The processing of the sample 1) has never finished successfully yet.

If the tool fails, it happens during relation loading process. The error says:

Workspace or data source is read only.

   at ESRI.ArcGIS.Geodatabase.IFeatureClass.Update(IQueryFilter filter, Boolean Recycling)
   at ESRI.ArcGIS.OSM.GeoProcessing.OSMToolHelper.updateIsMemberOf(IFeatureClass osmLineFeatureClass, Int32 osmMemberOfPolylineFieldIndex, String osmID, List`1 parentList)
   at ESRI.ArcGIS.OSM.GeoProcessing.OSMToolHelper.loadOSMRelations(String osmFileLocation, ITrackCancel& TrackCancel, IGPMessages& message, IFeatureClass osmPointFeatureClass, IFeatureClass osmLineFeatureClass, IFeatureClass osmPolygonFeatureClass, Int32 relationCapacity, ITable relationTable, OSMDomains availableDomains, Boolean fastLoad, Boolean checkForExisting)
   at ESRI.ArcGIS.OSM.GeoProcessing.OSMGPFileLoader.Execute(IArray paramvalues, ITrackCancel TrackCancel, IGPEnvironmentManager envMgr, IGPMessages message)

There are created all three feature classes (pt,ln,ply) successfully, but the tags aren’t extracted and fields for tags aren’t added to the feature classes. The error is all the time same.


Windows Server 2008 R2 and Windows 7 x64, ArcGIS 10.1, ArcGIS Editor for OSM 2.1 - beta 2