Image download failure from wget.download function.

Peter Otten __peter__ at web.de
Wed Dec 9 04:57:34 EST 2015


ashwath at nanoheal.com wrote:

> I am trying to download the image from a URL, I am able to download  a
> file but after downloading if I try to open the image it says file format
> is corrupted or damaged.

What version of python are you using? Where did you get the wget libary?
 
> I use this function to download the image  -  
> wget.download('http:////realpython.com//learn//python-first-steps//images//pythonlogo.jpg')

The above snippet will not work because all slashes are duplicated.
Please post a small but runnable script.

> For all the other URLs also same image format failure is happening.

How do you "open" the images? Do you mean you try to view them in an image 
viewer or are you reading the contents with Python? If the latter, show us 
your code for that, too.




More information about the Python-list mailing list