title: Fatal error reading PNG image file: Not a PNG file in Ubuntu 20.04 LTS
body: <p>I try to download an image using <a href="https://requests.readthedocs.io/en/v0.8.2/" rel="nofollow noreferrer">requests</a> module in python.It works but when i try to open this image it showing &quot;Fatal error reading PNG image file: Not a PNG file&quot;. <a href="https://pasteboard.co/JhRzO8C.png" rel="nofollow noreferrer">Here</a> is my error screenshot.And the code i used to download is,</p>
  <pre><code>import requests
  
  img_url = &quot;http://dimik.pub/wp-content/uploads/2020/02/javaWeb.jpg&quot;
  
  r = requests.get(img_url)
  
  with open(&quot;java_book.png&quot;,&quot;wb&quot;) as f:
      f.write(r.content)
  </code></pre>
  <p>And i run my code in terminal just saying, <code>python3 s.py</code> (s.py is the name of file).
  Is something wrong in my code or something else in my operating system(ubuntu 20.04 LTS)?</p>