Python 3.x build fails to import due to unicode strings in

Issue #135 resolved
Marius Mather created an issue

I was attempting to compile pygame for python3 today, using these instructions:, i.e. cloning the repository and running "python3 install".

While the compilation appeared to work fine, the module failed to import, giving this error message:

{{{ #!python

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python3.2/dist-packages/pygame/", line 106, in <module> import pygame.color File "/usr/local/lib/python3.2/dist-packages/pygame/", line 679 u'gray17' : (43, 43, 43, 255) , ^ SyntaxError: invalid syntax }}}

Inspecting revealed that from line 679 onwards, all the keys were in the form u'colour' :. I've fixed this on my local machine with a quick regex to remove the leading u, and the module now imports fine, but I'm not familiar enough with mercurial to upload a fix myself.

Comments (5)

  1. Log in to comment