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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -