• Register
0 votes
692 views

Problem :

I am trying to use the PyGame for Python, and I have been receiving the below warning while trying to load .png images with pygame.image.load:

Libpng warning: Interlace handling should be turned on when using png_read_image

It is not affecting the program, but it has become very annoying. I have tried researching the web for the answer to no avail.

Please Note: I am currently using 32 bit Python 3.3 with the PyGame 1.9.2

Any pointers as to how can I fix the warning?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :


I also had the same problem in recent past. It seems to be some bug of the older libpng versions (refer http://sourceforge.net/p/libpng/bugs/165/ for the details).

It should be already fixed for you, but not in my current setup: win32 + python 2.7.3.

So as the workaround I just converted the png-24 images to png-8 in the Photoshop and warning message has disappeared.

OR


I can also confirm that I was also having this same issue using the Pygame 1.9.6 with Python 3.7.4.

But I was able to fix it by just downloading Python 3.8 from https://www.python.org/ and after that installing Pygame 2.0.0.dev6 by doing the quick

python -m pip install Pygame>=2.0.0.dev6

You will be able to get it to work with the version in between the ones I mentioned.

9 7 4
38,600 points

Related questions

0 votes
1 answer 1.4K views
1.4K views
Problem : I am trying to convert my working Python 2.7 code into Python 3 code but I am facing following error post data should be bytes, an iterable of bytes, or a file object. it cannot be of type str.
asked Nov 16, 2019 peterlaw 6.9k points
0 votes
1 answer 2.2K views
2.2K views
Problem : MySample.csv contains the below details : NAME Id No Dept Tommy 1 12 CS Jimmy 2 35 EC Bonny 3 21 IT Franky 4 61 EE And my Python file contains the below code : import csv myifile = open('mysample.csv', "rb") read = csv.reader(myifile) for row in read : ... in for row in read : _csv.Error: iterator should return strings, not bytes (did you open the file in text mode?) How should I fix it?
asked Jan 2, 2020 alecxe 7.5k points
0 votes
1 answer 1.2K views
1.2K views
Problem : When I run my Python code I get the following exception: _csv.error: iterator should return strings, not bytes (did you open the file in text mode?)
asked Nov 18, 2019 peterlaw 6.9k points
1 vote
1 answer 578 views
578 views
Problem: I installed pygame in my system and tried to run the below code: import sys import settings import pygame def run_game(): pygame.init() all_settings = settings() screen = pygame.display.set_mode( (all_settings.screen_width, all_settings.screen_length)) pygame.display. ... a development version of SD L is installed. ImportError: No module named 'pygame' Can anyone help me to solve this?
asked Jun 1, 2020 samhaz 5k points
0 votes
1 answer 20 views
0 votes
1 answer 245 views
245 views
Problem : When I try to run following command: python manage.py updatestats I get the error as below: “TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'” I am unable to figure out ... ) File "/Users/alecxe/project/Dev/project_files/project/main/management/commands/updatestats.py", line 34, in handle unique_visits=display_unique_visits(hostname),)
asked Jan 2, 2020 alecxe 7.5k points
0 votes
1 answer 1.9K views
1.9K views
Problem : I am facing the issue in passing a function as a parameter to another function as follows typeerror: int() argument must be a string, a bytes-like object or a number, not 'nonetype'
asked Nov 18, 2019 peterlaw 6.9k points
0 votes
1 answer 19 views
19 views
Problem: I've install Python 3.4 and Python 3.6 on my local machine successfully, but am unable to install packages with pip3. When I execute pip3 install <package>, I get the following SSL related error: pip is configured with locations that require TLS/SSL, ... matching distribution found for <package> How can I fix my Python3.x install so that I can install packages with pip install <package>?
asked Jan 9 Mashhoodch 6.7k points
0 votes
1 answer 20 views
20 views
Problem : I just installed Python 3.5 and upon running the following code pip install mysql-python I am getting an error, which says: error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat) I have used the following lines of code to my PATH C:\ ... (x86)\Microsoft Visual Studio 12.0\VC; C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC My PC has 64bit window 7 setup.
asked Oct 8, 2020 sikandar 2.4k points
0 votes
1 answer 175 views
175 views
Problem: I have only basic knowledge in python and urllib. Currently I am trying to write the program which should download the mp3's from the website and after that join them together but on every occasion I try to download the mp3 files I face below error: Traceback ( ... usc.edu/~chiso/oldspice/m-b1-hello.mp3") Looking for the python and urlllib expert who can help me in fixing my above error.
asked Jul 22, 2020 Raphael Pacheco 4.9k points