ArcGIS Server - problem publishing python script that uses urllib

06-14-2016 12:02 PM
New Contributor III


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

import urllib

import arcpy

u = arcpy.GetParameter(0)

url = "" + 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 and finally crash. If I try to publish a script that do not import urllib, I have no problem.

Can someone tell me if trying to publish a python script that import urllib into ArcGIS Server could make the Publisher crashing?

0 Kudos
2 Replies
New Contributor III

After letting the publisher running idle for a while some errors shows up:

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\

Any idea what is going wrong?

0 Kudos
New Contributor

Have you looked at the following post:

geoprocessing service analysis/publish errors, trying to copy "data" that isn't needed

It looks like if you change your import from:

import urllib


from urllib import *

this may resolve your problem.