• Register
0 votes
1.1k 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?

7.5k 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.

38.6k points

Related questions

0 votes
1 answer 25 views
25 views
Problem: What should I do with this : Warning: libpng warning: iccp: known incorrect srgb profile?
asked Jun 23 Chi Omega 168k points
0 votes
1 answer 3 views
3 views
Problem : Is there any way to rectify this problem: Emulator: libpng warning: iccp: known incorrect srgb profile?
asked Jun 22 Siam55 110k points
0 votes
1 answer 28 views
28 views
Problem: Got this error and can't find the right answer > Alsa lib confmisc.c:768:(parse_card) cannot find card '0'
asked May 10 Junia Phoebe 83.8k points
0 votes
1 answer 77 views
77 views
Problem: 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 Mar 14 Wafa Abu Yousef 6.1k points
0 votes
1 answer 2.3k views
2.3k 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
1 vote
1 answer 793 views
793 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 89 views
89 views
Problem: how i can move on in dealing with this situation ? Iterator should return strings, not bytes (did you open the file in text mode?.
asked Mar 6 Wafa Abu Yousef 6.1k points
0 votes
1 answer 4.2k views
4.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.6k views
1.6k 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
0 votes
1 answer 46 views
46 views
Problem: Where should I seek assistance with this problem: Dictionary could be copied to another dictionary using which of following syntax?
asked Jun 13 Nahil 128k points