os.environ['PYTHONWARNINGS']="ignore:Unverified HTTPS request"
def createFeatureSet(serviceUrl, layerId, bbox):fsURL = buildUrl(serviceUrl, layerId,bbox)fs = arcpy.FeatureSet()result= urllib.urlopen(fsURL, context = ctx)fs.load(result)return fsfs_item = createFeatureSet(serviceUrl, l, bbox)fs_item.save("in_memory\\outlyr.shp")arcpy.MakeFeatureLayer_management("in_memory\\outlyr.shp", "outlayer")
Following error trace:
We have a script that worked just fine until yesterday and we're getting that same error. I 'ported' it over to python 3.x which entailed changing the print statements to print() functions. We originally imported urllib2 but it's no longer; after a google search, I found urllib.request has a .urlopen() method.
Bottom line, after making the changes and executing as a 3.x script, it still fails with the same error as the 2.x script does... Sigh....