Subject: Marine Geospatial Ecology Tools (MGET) help
Text archives
- From: Jason Roberts <>
- To: "Alabi, Tunrayo (IITA)" <>
- Cc: "" <>
- Subject: RE: [mget-help] Random Forest
- Date: Thu, 1 Mar 2018 16:47:38 +0000
- Accept-language: en-US
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Dear Tunrayo,
Thanks for your interest in MGET. I’m sorry you’re hitting this problem. Unfortunately it is likely going to be tough to resolve. Most likely it is a “DLL Hell” conflict arising between MGET and some other software on your machine. The explanation is a bit complicated; please bear with me.
When ArcGIS runs Python based tools as part of a “foreground” geoprocessing job, it starts the Python interpreter inside the running process that is the ArcGIS application (e.g. ArcMap.exe or ArcCatalog.exe). The Python interpreter begins interpreting and executing the Python code. In this case, it is MGET’s random forest tool. MGET utilizes other software libraries, many of which are open-source software that we have packaged inside MGET so you do not have to install it separately. One of these is the Geospatial Data Abstraction Library (GDAL). In the problem you’re seeing, MGET has begun loading GDAL’s Python library. The GDAL Python code tried to load the main GDAL dynamic link library (DLL) (gdal19.dll), either failed to load or tried to load some other DLLs itself and one of those failed to load. One of these attempts failed due to a “DLL Hell” problem. Probably one of two scenarios occurred:
1. The running ArcGIS process already had a DLL loaded with the same name, but it had a programming interface that was incompatible with what MGET’s copy of gdal19.dll expected. When Windows tried to link up that already-loaded DLL with the gdal19.dll that was being loaded, this incompatibility was revealed and Windows could not proceed.
2. A DLL with that name was not already loaded. The Windows LoadLibrary then walked through a checklist of locations in the file system, trying to locate the file. The checklist is long and complicated (see here). MGET’s installation contains a copy of the DLL but LoadLibrary found a different copy at one of the locations higher in the checklist, so it loaded it instead, and it turned out to be incompatible, typically because it is a newer or older version than what was expected. It is hard to say exactly where this location was, given only the information you have provided. But if you have done something like install your own copy of GDAL and reference it in the PATH environment variable, that is the kind of problem that can provoke this LoadLibrary failure.
It is usually hard to debug these problems. Not having direct access to your machine makes it even harder. So I can’t promise we’ll get to the bottom of this.
My initial questions are:
1. What other geospatial software is installed on this machine?
2. Have you, or have any of the installers of those other programs, modified the PATH environment variable?
3. Does this problem reproduce if you start a fresh copy of ArcGIS and then run the Fit Random Forest tool? Or does it only happen after you’ve done some other stuff in ArcGIS? (And what is that stuff? It will give us a clue what else is being accessed.)
4. Did you get any kind of pop-up box related to the LoadLibrary failure? Sometimes you will, and it can mention specifically what library failed to load. If we can determine that, we could search your whole disk for copies of that file and try to guess how the conflicting copy was getting loaded.
5. Please search your whole disk for the file gdal19.dll. Do you find any copies other than the one mentioned in the MGET error message?
Thanks, Jason From: Alabi, Tunrayo (IITA) [mailto:]
Dear Jason
Well done for a very useful set of tools
I just installed MGET tools and I use ArcGIS 10.5 with Python 2.7. Installation of MGET was successful and I was able to run many tools of MGET toolbox. I was trying to run Fit Random forest model and I got this error.
ImportError: The GeoEco.AssimilatedModules.osgeo.osr Python module could not be imported because win32api.LoadLibrary(r'C:\Python27\ArcGIS10.5\lib\site-packages\GeoEco\Bin\win32\gdal19.dll') raised error: (127, 'LoadLibrary', 'The specified procedure could not be found.'). Failed script RandomForestModelFitToArcGISTableUsingFormula...
I am bit new to python can you advise on what I am to do.
Thanks
Tunrayo Alabi GIS Support Services Manager Geospatial Laboratory International Institute of Tropical Agriculture (IITA) www.iita.org Headquarters & West Africa Hub PMB 5320, Oyo Road, Idi-Ose, Ibadan, Oyo State, Nigeria International Mailing Address: IITA, 7th Floor, Grosvenor House, 125 High Street, Croydon, CR0 9XP, UK Tel (office) +234 7008004482 ext. 2289 | Mobile UK: +44 787 0345924 | Mobile Nigeria +234 8055471334 Skype: [talabi21]
IITA is a member of the CGIAR Consortium www.cgiar.org
|
- RE: [mget-help] Random Forest, Alabi, Tunrayo (IITA), 03/01/2018
- RE: [mget-help] Random Forest, Jason Roberts, 03/01/2018
- RE: [mget-help] Random Forest, Alabi, Tunrayo (IITA), 03/02/2018
- RE: [mget-help] Random Forest, Jason Roberts, 03/01/2018
Archive powered by MHonArc 2.6.19.