Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
- From: Jason Roberts <>
- To: "(pg) Joanna L Harris" <>, "" <>
- Subject: RE: [mget-help] Error while trying to use Interpolate No Data Cells in MGET
- Date: Tue, 26 Feb 2019 19:43:03 +0000
- Accept-language: en-US
Hi Joanna,
This tool is complicated because it uses an interpolation algorithm implemented in MATLAB, and MATLAB and ArcGIS load some programming libraries (.DLL files) that are incompatible with each other, so MGET is not able to run the MATLAB code within the ArcGIS process that that invoked MGET. Instead, MGET has to create a child python.exe process that loads and runs the MATLAB Component Runtime without loading any ArcGIS libraries.
So, the text you see between this line:
Running script InterpolatorInpaintArcGISRaster...
and this line:
RuntimeError: python.exe returned exit code 1, indicating failure.
RuntimeError: Unexpected error thrown python.exe: RuntimeError: Unexpected error thrown
That doesn’t give us much to go on. I do not believe it is the problem described in the correspondence you linked to. The output that you showed indicated that MGET is executing with the correct Python interpreter (C:\Python27\ArcGIS10.6\python.exe).
The usual problem with the Interpolate No Data Cells tool is that it requires a lot of memory—so much that it is usually not possible to run it on rasters that are larger than about 1000x1000. If you are running it on a global MODIS image, it will definitely fail for that reason. But when it fails in this way, it usually reports the message OUT OF MEMORY (in all caps). We’re not seeing that here.
How big is your raster? Perhaps you could test the tool on a very small clipping of it, say 250x250, and see if it works there. If it does, scale it up and see when it fails. If it can’t quite handle the size you need, you could try the Del2c algorithm instead of Del2a. It is not quite as good mathematically but uses less memory.
If this still doesn’t work, you could send me your raster and I could try it here to see if I can reproduce and debug it. If you do this, please uses a service like Dropbox to send the raster, as it will probably be too large for me to receive in email.
Best, Jason
From: <>
On Behalf Of (pg) Joanna L Harris
Hi,
Firstly, MGET is amazing. I am engaged in a research project modelling habitat use by manta rays in a very remote location and this toolbox has greatly reduced the data collection and processing time. Thank you!
I do have a small issue with 'Interpolate No Data Cells'. I am trying to fill in missing Chl-a data from 8-day 4km MODIS composites but I have run into an error (see below) when trying to execute. I am not experienced with Python, so I am having trouble overcoming the problem. I found some correspondence available online (e.g. https://lists.nicholas.duke.edu/sympa/arc/mget-help/2015-12/msg00002.html), and I have tried the fix suggested, but it does not seem to work. I would be very grateful if you could give me some advice.
Best wishes, Joanna Harris
Executing: InterpolatorInpaintArcGISRaster extractcla "C:\Users\Joanna Harris\Desktop\Chagos Map\Chagos Tags\Processing data\MLR\chl8intra" Del2a # false # # Start Time: Sun Feb 24 10:34:52 2019 Running script InterpolatorInpaintArcGISRaster... RuntimeError: Unexpected error thrown python.exe: RuntimeError: Unexpected error thrown RuntimeError: python.exe returned exit code 1, indicating failure. The following consequences resulted from the original error: Execution of C:\Python27\ArcGIS10.6\python.exe failed. Failed script InterpolatorInpaintArcGISRaster...
Traceback (most recent call last): File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\InterpolatorInpaintArcGISRaster.py", line 5, in <module> ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.SpatialAnalysis.Interpolation', 'Interpolator', 'InpaintArcGISRaster') File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\ArcGISScripts.py", line 210, in ExecuteMethodFromCommandLineAsArcGISTool exec sourceCode in globals(), locals() File "<string>", line 1, in <module> File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\SpatialAnalysis\Interpolation.py", line 726, in InpaintArcGISRaster ArcGISWorkspace(os.path.dirname(outputRaster), ArcGISRaster, pathCreationExpressions=[os.path.basename(outputRaster)]).ImportDatasets([InpaintedGrid(ArcGISRasterBand.ConstructFromArcGISPath(inputRaster), method, maxHoleSize, xEdgesWrap, minValue, maxValue)], {False: u'Add', True: u'Replace'}[overwriteExisting], reportProgress=False) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\__init__.py", line 820, in ImportDatasets self._ImportDatasets(datasets, mode.lower(), reportProgress, options) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\Collections.py", line 695, in _ImportDatasets self._ImportDatasetsToPath(pathComponentsForPath[path], datasetsForPath[path], mode, progressReporter, options) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\ArcGIS.py", line 609, in _ImportDatasetsToPath self.DatasetType._ImportDatasetsToPath(os.path.join(self.Path, *pathComponents), sourceDatasets, mode, progressReporter, options) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\ArcGIS.py", line 1148, in _ImportDatasetsToPath GDALDataset._ImportDatasetsToPath(tempRaster, sourceDatasets, mode, None, {'useArcGISSpatialReference': True, 'useUnscaledData': useUnscaledData, 'calculateStatistics': False, 'blockSize': blockSize}) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\GDAL.py", line 1073, in _ImportDatasetsToPath data = "sourceDatasets[i].Data[rowsCopied:rowsCopied+rowsToCopy," :] File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\__init__.py", line 3671, in __getitem__ return getattr(self._Grid(), self._GetMethod)(key) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\__init__.py", line 3311, in _GetUnscaledDataAsArray data, actualNoDataValue = self._ReadNumpyArray(reorderedSliceList) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Datasets\Virtual.py", line 3614, in _ReadNumpyArray maxRunTime=None) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\DataManagement\Processes.py", line 575, in ExecuteProgram process.Execute() File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\DataManagement\Processes.py", line 498, in Execute Logger.RaiseException(RuntimeError(_(u'%(name)s returned exit code %(code)i, indicating failure.') % {u'name' : programName, u'code' : self.ExitCode})) File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\Logging.py", line 104, in RaiseException raise exception RuntimeError: python.exe returned exit code 1, indicating failure.
Failed to execute (InterpolatorInpaintArcGISRaster). Failed at Sun Feb 24 10:35:03 2019 (Elapsed Time: 10.39 seconds)
|
- [mget-help] Error while trying to use Interpolate No Data Cells in MGET, (pg) Joanna L Harris, 02/24/2019
- RE: [mget-help] Error while trying to use Interpolate No Data Cells in MGET, Jason Roberts, 02/26/2019
Archive powered by MHonArc 2.6.19.