python - COuld not identify the .png file in rest -
i using python-requests
module make rest call server .
based on rest trying png image server .
to handle using python-imaging
library
here code:
restc_url = 'http://10.10.10.76:8100/ucsrestservice/product/' +getpid + '/callimage' getclass = agent() print "+++++++++++++++++++++=--------------------------------" getr = getclass.gett('cdn',restc_url,'apikey','secretstring') pil import image stringio import stringio = image.open(stringio(getr.content)) print
but shows
cannot identify image file
please tell me reason error.
Comments
Post a Comment