I updated my python script from ArcGIS 9.3 Python 2.5 to ArcGIS 10.1 Python 2.7. The script is working from python 2.7 GUI, however, when I converted to exe by py2exe, and then ran the exe, I got the following errors:
C:\Python27\ArcGIS10.1\dist>SDEGetLatLongOfAProjectedPoint.exe
Traceback (most recent call last):
File "SDEGetLatLongOfAProjectedPoint.py", line 1, in <module>
File "arcpy\__init__.pyc", line 21, in <module>
File "arcpy\geoprocessing\__init__.pyc", line 14, in <module>
File "arcpy\geoprocessing\_base.pyc", line 14, in <module>
File "arcgisscripting.pyc", line 12, in <module>
File "arcgisscripting.pyc", line 10, in __load
ImportError: DLL load failed: The specified procedure could not be found.
I have 2 PCs, one pc is for ArcGIS 9.3.1 with python 2.5. the other for ArcGIS 10.1 with Python 2.7.
By the way, my python 2.5 script converted to the exe, which is working.
My Python 2.7 and py2exe for Python 2.7 is working. I created a generic python script (without using any import arcpy libraries), and converted it to the exe, which is working.
Please help. Thanks