I have problem publishing this simple python script as geoprocessing service with ArcGIS Server.

import urllib
import arcpy

u = arcpy.GetParameter(0)
url = "http://geoegl.msp.gouv.qc.ca/cgi-wms/mapcache.fcgi/tms/1.0.0/carte_gouv_qc_public@EPSG_3857/" + u

image = urllib.urlopen(url).read()


This is a simple proxy that uses urllib to redirect images. When I try to publish this script, ArcMap always go idle for a long long time. I think the cause of the problem is urllib. If I try to publish a script that do not import urllib, I have no problem.

After a long idle time, the Publisher returns the following errors:

High    Unresolved    00178    Data: C:\Windows\bfsvc.exe, used by Script Script cannot be copied to the server

High    Unresolved    24032    Data source used by Script Script is not registered with the server and will be copied to the server: C:\temp\arcgis\arcpy\ 

Can someone tell me why trying to publish a python script that import urllib into ArcGIS Server could return those errors?


From the following post:


It looks like if you change your import from:

import urllib


from urllib import *

this may resolve your problem.

  • Wow that's correct! Do you have an idea what was the problem? Jun 15 '16 at 19:22
  • Are you able to get to the REST endpoint for the service, or does that fail as well? If so, does it error out when you try to run it via the REST endpoint? Jun 15 '16 at 19:38
  • The REST endpoint works and I can use the service, however I cant manage its settings in the Admin console because of some javascript errors Jun 15 '16 at 19:39
  • 1
    Try using an administrative ArcGIS Server connection in ArcCatalog to manage settings for the service. Also, not sure what the main cause is of the import problem. My guess is that the process for the server that reviews the python misinterprets the imports as data. What version of ArcGIS Server are you using? Jun 15 '16 at 19:48
  • We are using ArcGIS Server 10.3 Jun 16 '16 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.