[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] PyGame Mac OS X 10.6 fail?
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] PyGame Mac OS X 10.6 fail?
- From: René Dudfield <renesd@xxxxxxxxx>
- Date: Sun, 13 Sep 2009 08:59:37 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Sun, 13 Sep 2009 03:59:41 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=nc0fK+ceiha4ReZx+tVVge7Hp1nlDO2uXKEIsYR7uzA=; b=hzvprMQaqyXWU6URl2ZONqjAtEDPVpVLb2KMueJHt37TD2jsD7nhY/BUxnOWGard83 pLrs5jBMeBuEbm2N1l2hNZXxcor5KF+3eb8Yd9O9qYRP5C6zsDpxdG9frVLR7/ai+a7y 5aysZMeac4p1RT+q7OfRGyjZrcMbjwrKro3YU=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=gUy8MXe50XK5v6BNGC+dL5pO1j6xHP8XPhAHL+kJC3JV+cOD2JZq59wVexUptLkpKl EGP0WhI3/0ky0ZxnwvU6V50IJF5uokgBhzs8RudwuB2RfaFnhC/W+VQillCf6Kx3eF5I /uv90lGzYtMdVjLf2F16MBqHPV790yt7UaRUw=
- In-reply-to: <568F39AF-F339-4F0A-BBC1-53CD846DD3F4@xxxxxxx>
- References: <568F39AF-F339-4F0A-BBC1-53CD846DD3F4@xxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
looks like the sysfont module is failing in some way...
Can you please run:
python -m pygame.tests.__main__
and let me know what is failing?
cheers,
On Sat, Sep 12, 2009 at 12:12 AM, Bill Coderre <bcbc@xxxxxxx> wrote:
> So I am running Mac OS X 10.6.1 on a MacBook Air. I can't QUITE get PyGame
> working. This might be something that changed out from under me, but if so,
> it also breaks the sample program ants.py in chapter 7 of BPWPAP
> 1) I installed Python 2.6.2 from python.org
> 2) I installed the pygame 1.9.1 for py 2.6 for 10.5 zip:
> http://pygame.org/ftp/pygame-1.9.1release-py2.6-macosx10.5.zip
> 3) I cd to the directory with my game launcher, and run it, and get the
> following errors:
>
> [airboat:Programming/Pythons/PlantLand.activity] bcbc% python run.py
> 2009-09-11 13:50:41.219 Python[781:607] Warning once: This application, or a
> library it uses, is using NSQuickDrawView, which has been deprecated. Apps
> should cease use of QuickDraw and move to Quartz.
> Traceback (most recent call last):
> File "run.py", line 10, in <module>
> world.run(40,True)
> File
> "/Users/bcbc/Desktop/Programming/Pythons/PlantLand.activity/world.py", line
> 11, in run
> font = pygame.font.SysFont(default_font, 24)
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py",
> line 555, in SysFont
> initsysfonts()
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py",
> line 522, in initsysfonts
> fonts = initsysfonts_darwin()
> File
> "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pygame/sysfont.py",
> line 422, in initsysfonts_darwin
> _search_osx_font_paths(fonts)
> UnboundLocalError: local variable 'fonts' referenced before assignment
>
> Here is the code running up to the error:
>
> def run(framerate,doCrossfade):
> pygame.init()
> screen = pygame.display.set_mode(DISPLAY_SIZE, 0, 32)
> startSurface = pygame.Surface(DISPLAY_SIZE, 0, depth=32)
> endSurface = pygame.Surface(DISPLAY_SIZE, 0, depth=32)
> default_font = pygame.font.get_default_font()
> font = pygame.font.SysFont(default_font, 24)
>
> So it looks like default_font is getting set, but then
> pygame.font.SysFont(default_font,24) is failing deep inside the works
> somewhere.
>
> 4) just typing "python" produces seemingly correct behavior:
>
> [airboat:Programming/Pythons/PlantLand.activity] bcbc% python
> Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39)
> [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> 2+2
> 4
>
> Thank you as always!
>