We have some custom GP services which were successfully working in an ArcGIS Server 10.1. ArcGIS Desktop was also available in that machine. Recently the desktop has been uninstalled and the server has been upgraded to 10.3. Now these GP services are not working. Following is the error log I got from the ArcGIS Server Manager.
Traceback (most recent call last): File "D:\arcgisserver\directories\arcgissystem\arcgisinput\hello.GPServer\extracted\v101\my_toolboxes\hello.py", line 8, in import arcpy, sys, os, datetime, glob, ConfigParser File "c:\program files\arcgis\server\arcpy\arcpy\__init__.py", line 31, in import arcpy.sa File "c:\program files\arcgis\server\arcpy\arcpy\sa\__init__.py", line 24, in from . import Functions as __Functions ImportError: cannot import name Functions Failed to execute (hello). Failed to execute (Hello).
I doubt this may be due to the installation problem with python. So I tried to import arcpy in a sample python program and got the following error:
Traceback (most recent call last):
File "module1.py", line 19, in <module>
File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\__init__.py", line 31, in <module>
File "C:\Program Files\ArcGIS\Server\arcpy\arcpy\sa\__init__.py", line 29, in <module>
__all__ += __ParameterClasses.__all__
AttributeError: 'module' object has no attribute '__all__'
The sys.path yields the following:
['', 'C:\\Python27\\ArcGISx6410.3\\Lib\\site-packages', 'C:\\Windows\\system32\\python27.zip', 'C:\\Python27\\ArcGISx6410.3\\DLLs', 'C:\\Python27\\ArcGISx6410.3\\lib', 'C:\\Python27\\ArcGISx6410.3\\lib\\plat-win', 'C:\\Python27\\ArcGISx6410.3\\lib\\lib-tk', 'C:\\Python27\\ArcGISx6410.3', 'C:\\Program Files\\ArcGIS\\Server\\bin', 'C:\\Program Files\\ArcGIS\\Server\\arcpy', 'C:\\Program Files\\ArcGIS\\Server\\ArcToolBox\\Scripts']
Can anyone help me in identifying the issue.