• Register
0 votes
474 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

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 1K views
1K 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 1.3K views
1.3K 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 alecxe 7.5k points
0 votes
1 answer 795 views
795 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 196 views
196 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 alecxe 7.5k points