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

Issues

Issue #133 resolved

pygame.Color fails when unicode_literals imported from __future__

Daniel Drucker
created an issue

{{{ Python 2.7.3 (v2.7.3:70274d53c1dd, Apr 9 2012, 20:52:43) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import pygame pygame.ver '1.9.2pre' pygame.Color('red') (255, 0, 0, 255) from future import unicode_literals pygame.Color('red') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid argument }}}

Comments (4)

  1. Radomir Dopieralski

    Actually that has nothing to do with unicode literals. It just crashes with any unicode string.

    >>> pygame.Color(u'red')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ValueError: invalid argument
    
  2. Log in to comment