pygame.surfarray doesn't work under Python 3

Issue #60 resolved
René Dudfield created an issue

== Dave Burton, 2011-01-07 01:25:24 -0800

{{{ Even though numpy is now working in Python 3, pygame.surfarray still doesn't work at all in pygame-1.9.1.win32-py3.1.msi with python-3.1.2.msi and numpy-1.5.1-win32-superpack-python3.1.exe under Windows Vista.

To see the problem, just run the that comes with pygame; 4 of 14 tests fail:

C:>cd \python31\lib\site-packages\pygame\tests

C:\Python31\Lib\site-packages\pygame\tests>\python31\python EE.EE......... ====================================================================== ERROR: test_array2d (main.SurfarrayModuleTest)

Traceback (most recent call last): File "", line 147, in test_array2d arr = pygame.surfarray.array2d(surf) File "C:\python31\lib\site-packages\pygame\", line 104, in array2d return numpysf.array2d (surface) File "C:\python31\lib\site-packages\", line 77, in array2d data = ''.join (pattern.findall (data)) TypeError: can't use a string pattern on a bytes-like object [...snip...]

BTW, I used a mailinator address for this bugzilla account. My real contact information is here:

Dave }}}

Comments (6)

  1. René Dudfield reporter

    I think this has been fixed with the latest pygame for python3.2. Python3.1 is considered unsupported by so we do too.

    Still need one other person to confirm the bug does not exist with python 3.2 and pygame 1.9.2pre.

  2. René Dudfield reporter

    python 3.2 wasn't out yet when pygame 1.9.1 was released.

    confirmed that surfarray tests are failing for python 3.2 and tip pygame.

  3. Log in to comment