[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Re: Import error on Windows
René Dudfield <renesd@xxxxxxxxx> wrote:
> On Tue, Aug 30, 2011 at 10:45 PM, Russell E. Owen
> <rowen@xxxxxx> wrote:
> > A colleague is building a Windows application using py2exe. He recently
> > upgraded from Python 2.5 and pygame 1.9.1 to Python 2.7 and pygame
> > 1.9.2pre.win32.py2.7 (I'm guessing 1.9.2a0 but I can't confirm that).
> > This application only plays sounds, so it only imports pygame.mixer
> > However, after upgrading Python and pygame the application fails with an
> > import error, saying it can't find pygame._view.
> > For now he's hacked around the problem by explicitly importing
> > pygame._view in the code. However, surely this should not be necessary?
> > I hope this is a fixable bug in 1.9.2 prerelease
> The import error seems to be because py2exe is not detecting the _view
> module. There is probably some hack we can do to fix this (like importing
> it manually somewhere so py2exe can find it).
> I've committed this change, so maybe it will work now without the manual
> import in the app.
Thank you very much. I'll let my colleague know.
> @Lenard: do you think this would be ok to do?
> > -- Russell
> > P.S. I never got any response to my offer of a binary installer of 1.9.1
> > for Mac Python 2.7. It's still available here:
> > <http://www.astro.washington.edu/users/rowen/python/pygame-1.9.1release-p
> > ython.org-32bit-py2.7-macosx10.3.dmg>
> > and it would be great if you folks were willing to serve it.
> Thanks for that!
> Are you able to get some testing for that binary by someone on a separate
> machine to yours? Does it pass all of the tests? We need to make sure
> binaries get some testing before we put them up there.
The unit tests (python run_tests.py) pass on two machines of mine (MacOS
X 10.6.8 and 10.4.11--the machine I use to build it), except for one
ERROR: all_tests_for (test.midi_test.AllTestCases)
Traceback (most recent call last):
File "test/test.midi_test.py", line 1, in all_tests_for
subprocess completely failed with return code of 0
/test_runner.py', 'test.midi_test', '--exclude',
'interactive,subprocess_ignore,python2_ignore', '--timings', '1']
'LESS': '-r', 'TERM_PROGRAM_VERSION': '273.1', 'ORIGINAL_PATH':
'ssh', 'LOGNAME': 'rowen', 'USER': 'rowen', 'HOME': '/Users/rowen',
'\\u$ ', 'LSST_HOME': '/Users/rowen/lsst_home', 'TERM_PROGRAM':
'Apple_Terminal', 'LANG': 'en_US.UTF-8', 'HISTCONTROL': 'ignoreboth',
'TERM': 'xterm-color', 'Apple_PubSub_Socket_Render':
'/tmp/launch-LmXbYf/Render', 'SHLVL': '1', 'MACOSX_DEPLOYMENT_TARGET':
'10.4', 'DISPLAY': '/tmp/launch-PZ3s9N/org.x:0', 'EDITOR': 'bbedit -w',
'JAVA_HOME': '/Library/Java/Home/', 'SSH_AUTH_SOCK':
'/tmp/launch-4CUEgj/Listeners', 'SCONSFLAGS': '-j 2', 'SHELL':
'/bin/bash', 'SDSS_SVN': 'svn+ssh://sdss3svn@xxxxxxxxx/repo', 'TMPDIR':
'/usr/local/ant/', 'LSST_SVN': 'svn+ssh://svn.lsstcorp.org', 'OLDPWD':
'__CF_USER_TEXT_ENCODING': '0x1F5:0:0', 'PWD':
'less', 'COMMAND_MODE': 'legacy'}
return (top 5 lines):
By comparison, your standard binary installer for python.org Python 2.6
has 7 unit test failures on my 10.4.11 machine. So this is potentially
The sound stuff is well tested -- lots of people are using it in an app
I distribute, on a variety of Macs. Unfortunately my application does
not exercise any of the rest of pygame.
> If you have a bitbucket username, I can add you so that you can upload files
> onto there. We are moving to hosting the files on there, and having the
> main website sync from there.
I just created a bitbucket login: rowen