Ticket #12957 (closed defect: worksforme)
libpng error when trying to use pygame with png files
| Reported by: | nathan.stocks@… | Owned by: | ryandesign@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.5.2 |
| Keywords: | libpng pygame | Cc: | nathan.stocks@…, ryandesign@… |
| Port: |
Description
I've got a MacBook Pro (core 2 duo, 2GB RAM) and I use MacPorts (well, it was darwin ports awhile ago) to install python, pygame and stuff like that. I checked when I first got it, and my project (nathancheckers) seemed to run fine at the time. Now, about a year later, it fails with the following error, which I can't figure out.
$ ./nathancheckers.py Traceback (most recent call last):
File "./nathancheckers.py", line 26, in ?
from nc_display import *
File "/Users/nathan/nathancheckers/tags/1.5/nc_display.py", line 82, in ?
set_theme()
File "/Users/nathan/nathancheckers/tags/1.5/nc_display.py", line 33,
in set_theme
global g_board; g_board = l(j('themes',theme,'g_board.png'))
pygame.error: Failed loading libpng12.dylib: dlopen(libpng12.dylib, 2): image not found
I've manually checked that the png image it wants still exists in the same location it always had. I've upgraded MacPorts (sudo port -d selfupdate) and everything in it including libpng and pygame to the latest versions (sudo port -v upgrade outdated). The .dylib file for libpng even exists:
$ locate libpng12.dylib /opt/local/lib/libpng12.dylib
Any ideas? nathancheckers is open source. You can download the full source and everything here (the "linux" download is the full source tarball):
http://www.stocksfam.com/nathancheckers/
Any ideas???


There was yet another version of libpng available (@1.2.22). After upgrading to it AND rebooting, the libpng issue has disappeared.