ERROR 010005 and ERROR 010067

933 views
Skip to first unread message

Gustavo F. Lucero

unread,
Jul 12, 2017, 12:41:26 PM7/12/17
to Linkage Mapper
Good Morning
I'm working with a dem of 38x38 cellsize and a shapefile with 3 points for test the tool.
It gives me the following error.
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).

Thanks for the help!!

Gustavo.







**********************************************************************
Linkage Mapper log file: Linkage Mapper 

Start time: Wed Jul 12 11:35:05 2017 
Parameters: ['D:\\Link\\linkage-mapper-arc_10_5\\toolbox\\scripts\\lm_master.py', 'D:\\Patag', 'Sitios2', 'Core_Id', 'Dem.tif', 'true', 'true', 'Cost-Weighted & Euclidean', '#', 'true', 'true', 'false', '4', 'Cost-Weighted', 'true', 'true', '#', '#', '#'] 


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 

Linkage Mapper Version 1.1.0
on ArcGIS Desktop 10.4.1 Service Pack N/A
Setting data frame spatial reference to that of core area feature class.
 
---------------------------------
Starting at step 1.

Making temporary copy of resistance raster for this run.

Making temporary raster of core file for this run.
 
---------------------------------
Running script s1_getAdjacencies.py
Adjacency files will be written to D:\Patag\datapass\adj

Calculating cost-weighted distance adjacency
Starting cost-weighted distance allocation...
Processing cell size: 150
The following ArcGIS error is being reported on line line 187 of "D:\Link\linkage-mapper-arc_10_5\toolbox\scripts\s1_getAdjacencies.py":
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 
The following ArcGIS error is being reported on line line 187 of "D:\Link\linkage-mapper-arc_10_5\toolbox\scripts\s1_getAdjacencies.py":
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 
The following ArcGIS error is being reported on line line 187 of "D:\Link\linkage-mapper-arc_10_5\toolbox\scripts\s1_getAdjacencies.py":
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 
The following ArcGIS error is being reported on line line 187 of "D:\Link\linkage-mapper-arc_10_5\toolbox\scripts\s1_getAdjacencies.py":
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 
The following ArcGIS error is being reported on line line 187 of "D:\Link\linkage-mapper-arc_10_5\toolbox\scripts\s1_getAdjacencies.py":
ERROR 010005: Unable to allocate memory. Cost Distance mapping Failed
ERROR 010067: Error in executing grid expression.
Failed to execute (CostAllocation).


********************************************************
NOTE: ArcGIS errors are more likely when writing to remote drives or deep file structures. We recommend shallow project directories on local drives, like C:\puma. Errors may also result from conflicts with anti-virus software (known problems with AVG). We have also seen conflicts when writing to synchronized folders like DROPBOX.

Note also that Linkage Mapper tools often work best when run from ArcCatalog instead of ArcMap. 
 
---------------------------------
 
---------------------------------
****Failed in step 1. Details follow.****
---------------------------------
 
---------------------------------
****Failed in step 1. Details follow.****
---------------------------------
---------------------------------
---------------------------------
A record of run settings and messages can be found in your log directory:
D:\Patag\run_history\log
---------------------------------
 

Stop time: Wed Jul 12 11:41:43 2017 


John Gallo

unread,
Jul 12, 2017, 6:35:54 PM7/12/17
to Linkage Mapper
Hi Gustavo,

it is breaking when making the cost weighted distance raster.  This is where it shows the cost form any particular cell to each core area.

This is at the very start of everything in the model.

My instinct  is that you have started with too simple of an example.  Maybe it needs 5 core areas, that reminds me of something a long time ago,  or maybe such a small resistance surface is too small, or maybe it needs polygons instead of points for core areas (unlikely).  Can you address these in order, or, alternatively, try it on your real data?

Thanks,

John

P.S. The code it is breaking on is accessible in your tools/scripts folder,and  is here:

Line 191 is:  exec statement of the below.

  gprint('Starting cost-weighted distance allocation...')

        # core_rastmp = 'core_rastmp'
        if cfg.TMAXCWDIST is not None:
            gprint('Maximum cost-weighted distance set to ' +
                              str(cfg.TMAXCWDIST))
        gp.CellSize = gp.Describe(bResistance).MeanCellHeight
        gp.extent = "MAXOF"
        gprint('Processing cell size: ' + gp.CellSize)

        gp.workspace = cfg.ADJACENCYDIR
        gp.scratchworkspace = cfg.ARCSCRATCHDIR

        lu.delete_data(cfg.CWDGDB)
        if not gp.exists(cfg.CWDGDB):
            gp.createfilegdb(cfg.OUTPUTDIR, path.basename(cfg.CWDGDB))
        outDistanceRaster = path.join(cfg.CWDGDB, PREFIX + "_cwd")
        alloc_ras = path.join(cfg.ADJACENCYDIR, ALLOC_RASFN)
        lu.delete_data(alloc_ras)
        lu.delete_data(outDistanceRaster)

        count = 0


        if arcpy:
            statement = ('costAllocOut = CostAllocation(cfg.CORERAS, '
                        'bResistance, cfg.TMAXCWDIST, cfg.CORERAS,"VALUE", '
                        'outDistanceRaster);'
                        'costAllocOut.save(alloc_ras)')
        else:
            statement = ('gp.Costallocation_sa(cfg.CORERAS, bResistance, '
                     'alloc_ras, cfg.TMAXCWDIST, cfg.CORERAS, "VALUE", '
                     'outDistanceRaster, "")')
        while True:
            try:
                exec statement
            except:
                count, tryAgain = lu.retry_arc_error(count, statement)
                if not tryAgain:
                    exec statement
            else:
                break
        gprint('\nBuilding output statistics and pyramids for CWD raster.')
        lu.build_stats(outDistanceRaster)
        gp.scratchworkspace = cfg.ARCSCRATCHDIR
        gprint('Cost-weighted distance allocation done.')
        start_time = lu.elapsed_time(start_time)
        adjshiftwrite(alloc_ras, outcsvfile, outcsvLogfile)

    # Return GEOPROCESSING specific errors
    except arcgisscripting.ExecuteError:
        lu.dashline(1)
        gprint('****Failed in step 1. Details follow.****')
        lu.exit_with_geoproc_error(_SCRIPT_NAME)

John Gallo

unread,
Jul 12, 2017, 6:40:07 PM7/12/17
to linkage...@googlegroups.com
Hi Gustavo,

On second thought, your most time effective route may be to try it with real data before trying to troubleshoot your sample data.  Also, I'm assuming it worked fine for the sample data in the zip folder, and detailed in the Linkage Mapper manual. 

Good luck,

John


--
You received this message because you are subscribed to a topic in the Google Groups "Linkage Mapper" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/linkage-mapper/tPPFpo_-FFk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to linkage-mapper+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

John Gallo, Ph.D. | Senior Scientist
Conservation Biology Institute
136 SW Washington Avenue, Suite 202
Corvallis, OR 97333
Remote Office: Inglenook, CA
Phone: 707.962.9078
@johnagallo
databasin.org

Gustavo F. Lucero

unread,
Jul 14, 2017, 11:17:45 AM7/14/17
to Linkage Mapper
Hi John

Finally the problem was solved !!!. I worked with a larger raster and replaced the points with polygons. Thank you very much for the help.

Gustavo.

To unsubscribe from this group and all its topics, send an email to linkage-mappe...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages