i have the webservice posted below. the url when opened it should return a tifffile.
when i run this code i get the following error message
`(Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
During handling of the above exception, another exception occurred:`
please let me know how to recive and read tiff file that is returned from a url
code:
@app.route("/getTIFFForURL/<string:polygonCoordinates>", methods=['GET'] )
def getTIFFForURL(polygonCoordin/ates):
url = config['EndPoint']['https'] + config['SYNOPSEndPoint']['rasterInPolygonEndPoint'] + config['SYNOPSEndPoint']['polygonToken'] + config['SYNOPSEndPoint']['polygonDelimiterOpen'] + polygonCoordinates + config['SYNOPSEndPoint']['polygonDelimiterClose'] + config['SYNOPSEndPoint']['rasterInPolygonResolutionToken']
url = url.replace(" ","%20")
url = url.replace("&","%26")
backendResponseAsTIFF = readResponseAsTIFFForURL(url)
return json.dumps(backendResponseAsTIFF)
def readResponseAsTIFFForURL(baseURL):
# TODO: remove before production:
resp = requests.get(baseURL)
tiffContents = tiff.imread(io.BytesIO(resp.content))
logger.debug(tiffContents)
return "OK"