2

I have an ArcGIS geoprocessing service which causes problems when publishing to arcgis server. The python scripts behind the service are structured as a custom python module, in a folder with an 'init.py' file, because the scripts contain many thousands of lines of code and there was a design choice to develop this way. My problem is that the script 'main.py' is published to the server correctly, but all of the other scripts are not. 'main.py' calls all of the other scripts. Therefore when I try to run the service I get ' Import Error - No such module as Scriptsforservice', where main.py is importing.

Is there a way to get arcgis to upload the custom module properly during publishing? I have found a hack which is to copy the module directly into my server's local python libraries, but this is not an acceptable long term solution.

closed as unclear what you're asking by PolyGeo Feb 22 '15 at 12:27

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Have you seen this help topic: resources.arcgis.com/en/help/main/10.2/#/… Specifically these sections "Importing other Python modules" and "Making project data and modules tool parameters" – KHibma Feb 18 '14 at 14:50
  • I think we would need to see some working code snippets that illustrate your coding pattern and where you are stuck before this can become answerable. – PolyGeo Feb 22 '15 at 12:27