• Register
0 votes
877 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 9 views
9 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 1.7K views
1.7K 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 669 views
669 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 11 views
11 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 2.9K views
2.9K 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.4K views
1.4K 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 5 views
5 views
Problem: Please help me … how can I solve it? valueerror: err must be [ scalar | n, nx1 or 2xn array-like ]
asked Mar 31 Ifra 24.4k points
0 votes
1 answer 9 views
9 views
Problem: Can someone tell me how to correct TypeError: Unicode-objects must be encoded before hashing?
asked Mar 16 ummesalma 24.5k points
0 votes
1 answer 9 views
9 views
Problem: typeerror: unicode-objects must be encoded before hashing.
asked Feb 24 Ethan ross 2.6k points
0 votes
1 answer 76 views
76 views
Problem: dataframe' objects are mutable, thus they cannot be hashed.
asked Feb 16 charles mathews 5.5k points