[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] still no ideas on that py2app pygame.mixer.music thing?



On Thu, Dec 18, 2008 at 09:56:19AM +1100, René Dudfield wrote:
> Hi,
> 
> I added a couple of printf statements to src/mixer.c and lib/__init__.py
> 
> get a download from here when it updates(r1751)
> http://thorbrian.com/pygame/builds.php
> 
> I think py2app stopped working correctly at some point, and the
> imports are stuffing up.
> 
> One I know what it prints out, then maybe I can figure out what to do next.
> 
> I don't have access to a mac to test with at the moment...


Okay, so I installed last night's pygame 1.9 build. When I run my test 
script directly, it works perfectly, but I see:

--------------
darkside:~/src/hamster/stegavorto/musictest james$ python test.py
NOTE: failed loading pygame.mixer_music in src/mixer.c
NOTE2: failed importing pygame.mixer_music in lib/__init__.py
--------------

When I run it from a py2app bundle, it says:

--------------
NOTE2: failed importing pygame.mixer_music in lib/__init__.py
Traceback (most recent call last):
  File 
"/Users/james/src/hamster/stegavorto/musictest/dist/musictest.app/Contents/Resources/__boot__.py", 
line 31, in <module>
    _run('test.py')
  File 
"/Users/james/src/hamster/stegavorto/musictest/dist/musictest.app/Contents/Resources/__boot__.py", 
line 28, in _run
    execfile(path, globals(), globals())
  File 
"/Users/james/src/hamster/stegavorto/musictest/dist/musictest.app/Contents/Resources/test.py", 
line 5, in <module>
    pygame.mixer.music.load("song.ogg")
AttributeError: 'module' object has no attribute 'music'
2008-12-18 08:33:36.092 musictest[11800] musictest Error
2008-12-18 08:33:36.093 musictest[11800] musictest Error
An unexpected error has occurred during execution of the main script

AttributeError: 'module' object has no attribute 'music'
--------------

I find it curious that the first "NOTE" doesn't show up.

> Also, please try  "import pygame.mixer_music"  before you import
> anything else in pygame.

I tried. It made no difference. Neither running the script directly nor 
when in the py2app bundle. the debug NOTE lines were the same.

---
James Paige