I am trying to use the exploratory regression tool in 10.5.1 Education edition and am getting this error message:
"Close WindowERROR updateParameters Syntax Error: Runtime error Traceback (most recent call last): File "e:\desktop10.5\ArcToolbox\Toolboxes\Spatial Statistics Tools.tbx#ExploratoryRegression_stats.UpdateParameters.py", line 2, in File "e:\desktop10.5\ArcToolbox\Scripts\SSUtilities.py", line 26, in import WeightsUtilities as WU File "e:\desktop10.5\ArcToolbox\Scripts\WeightsUtilities.py", line 22, in import SSPanelObject as SSPO File "e:\desktop10.5\ArcToolbox\Scripts\SSPanelObject.py", line 18, in import pandas as PANDAS File "E:\ArcGIS10.5\lib\site-packages\pandas\__init__.py", line 22, in from pandas.compat.numpy import * File "E:\ArcGIS10.5\lib\site-packages\pandas\compat\__init__.py", line 36, in from unicodedata import east_asian_width ImportError: DLL load failed: %1 is not a valid Win32 application. Click for more detailed information."
I saw something about adding a path file which appeared to be a fix in an earlier version, but don't know where to find the necessary file or where to insert the command. I've already tried doing a repair, then renaming the toolbox file and another repair, and have background processing turned off. It is all the Spatial Analyst tools at issue, Getis-Ord General G gives this similar error:
"Traceback (most recent call last): File "e:\desktop10.5\ArcToolbox\Scripts\GeneralG.py", line 15, in <module> import SSUtilities as UTILS File "e:\desktop10.5\ArcToolbox\Scripts\SSUtilities.py", line 26, in <module> import WeightsUtilities as WU File "e:\desktop10.5\ArcToolbox\Scripts\WeightsUtilities.py", line 22, in <module> import SSPanelObject as SSPO File "e:\desktop10.5\ArcToolbox\Scripts\SSPanelObject.py", line 18, in <module> import pandas as PANDAS File "E:\ArcGIS10.5\lib\site-packages\pandas\__init__.py", line 22, in <module> from pandas.compat.numpy import * File "E:\ArcGIS10.5\lib\site-packages\pandas\compat\__init__.py", line 36, in <module> from unicodedata import east_asian_width ImportError: DLL load failed: %1 is not a valid Win32 application."
Any ideas?
Solved! Go to Solution.
OK, so I fixed it. All it took was uninstalling Anaconda.
I clicked on some other posts relating to spatial stats and found that Anaconda seemed to not be playing nice. I first tried getting them to work together as the post suggested, but I couldn't get it fixed and am out of time. ESRI - this is a known problem through several releases, PLEASE FIX so we don't abandon you to another product because it took too long to find the problem or can't just uninstall.
Your installation path is a bit unusual...
conventional install with no direction would indicate a path to the toolboxes like this
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcToolbox\Toolboxes
Yes, I understand. However, I run all my programs from my E drive and is not a problem for any of the other toolboxes [outside of Spatial Analyst] in this version, nor has it been a problem with previous versions of ArcGIS Desktop that have been on my machine.
Here are additional similar instances of this happening on machines with the more usual pathway:
Error while running Hot Spot Analysis (Getis-Ord Gi) tool in ArcGIS 10.4.1 - Stack Overflow - No Answer
Error message(s) when running Spatial Statistics tools - This one has a solution if someone could help me understand how to do this:
[add] "C:\Python27\ArcGIS10.1\Lib\site-packages\" to the PYTHONPATH environmental variable
locate this folder and file
C:\Python27\ArcGIS10.5\Lib\site-packages\Desktop10.5.pth
and examine its contents in a text editor and read this... help file topic
10.3 is substituted for 10.5
All this other copy this and that stuff... don't like that, but if you can't use a standard install, try what you have to
OK, I found my file: E:\ArcGIS10.5\Lib\site-packages\Desktop10.5.pth and opened it to see:
E:\Desktop10.5\bin
E:\Desktop10.5\ArcPy
E:\Desktop10.5\ArcToolBox\Scripts
Exactly as the example said it should be. I double checked and the files are located in their respective locations - check.
However, then I went in and looked at the actual code for the Exploratory Regression tool... then I went in to a tool I know is working (Iso Cluster Unsupervised Classification) and I viewed the code.
I thought I might have stumbled upon the problem from my poking around when I realized that C++ is CASE SENSITIVE maybe the problem lay in the code as such:
IsoClusterUnsupervised.py is written all lowercase but without an import statement.
Whereas the Exploratory Regression code says: import arcpy as ARCPY
...
Now my file says E:\Desktop10.5\ArcPy so everything should be good right? Nope.
The ACTUAL file location is E:\Desktop10.5\arcpy
So I changed the pth file to reflect this change, I didn't think it would work - it is giving me line numbers for the errors right? so it must be making it to the files... I was right and it didn't work (always hopeful for the simple fix) but wanted to try SOMETHING.
Then I read this article Enable Python installations that were not installed by ArcGIS to access Arcpy functionality | Python... so ok, go to the system file and add the path there... still no good. I don't have another code to delete it all (including the past remnants that did not get removed when I did the uninstall of the prior version) and start again.
Any other ideas please I have to get my project done and at this point I may have to abandon Arc to do the analysis that I will then have to bring back into Arc - not ideal!
OK, so I fixed it. All it took was uninstalling Anaconda.
I clicked on some other posts relating to spatial stats and found that Anaconda seemed to not be playing nice. I first tried getting them to work together as the post suggested, but I couldn't get it fixed and am out of time. ESRI - this is a known problem through several releases, PLEASE FIX so we don't abandon you to another product because it took too long to find the problem or can't just uninstall.
Thanks for the answers. For me the source was python_27_64 bit installed next to 32bit version arcgis is using. This is a mess, why does ESRI not install it into ArcGIS directory without any paths?