1. pygame
  2. pygame
  3. pygame
  4. Issues


Issue #60 resolved

pygame.surfarray doesn't work under Python 3

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 surfarray_test.py 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 surfarray_test.py EE.EE......... ====================================================================== ERROR: test_array2d (main.SurfarrayModuleTest)

Traceback (most recent call last): File "surfarray_test.py", line 147, in test_array2d arr = pygame.surfarray.array2d(surf) File "C:\python31\lib\site-packages\pygame\surfarray.py", line 104, in array2d return numpysf.array2d (surface) File "C:\python31\lib\site-packages\pygame_numpysurfarray.py", 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: http://www.burtonsys.com/email/

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 python.org 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. Log in to comment