Sun 19 Mar 2017 02:52:57 AM UTC, comment #2:
Alright, I've fixed a couple bugs that were causing the reported errors to be incorrect, but these were only bugs that caused incorrect exceptions to be raised; they don't solve your problem. I've determined that the core problem is actually with Pygame. Specifically: Pygame doesn't support Unicode characters in paths, so your username which has an accented character is screwing it up. There is nothing I can do about this.
One workaround which should probably work is to uninstall your user installations of these libraries, and re-install them system-wide. The system-wide paths probably don't contain Unicode characters and therefore probably will not trigger this particular problem.
Alternatively, you could give pygame-cffi a try. But installing everything system-wide is probably better.
In any case, this did lead to some bugfixes, so thank you for the report. :)
|
Sat 18 Mar 2017 08:00:59 PM UTC, original submission:
I was trying to play Hexoshi when I got these errors:
e = "`{}` is not a Color object.".format(repr(fill))
NameError: name 'fill' is not defined.
C:\Users\Bárbara\Desktop\hexoshi>python hexoshi.py
Initializing game system...
Initializing GUI system...
Pygame errors during search:
None
Traceback (most recent call last):
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xsge_gui\__init__.py", line 3132, in init
button_sprite = sge.gfx.Sprite("button", DATA)
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sge\gfx.py", line 554, in _init_
raise OSError(msg)
OSError: Supported file(s) for sprite name "button" not found in C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xsge_gui\data
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hexoshi.py", line 5286, in <module>
xsge_gui.init()
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xsge_gui\__init__.py", line 3177, in init
button_sprite.draw_rectangle(0, 0, 1, 24, fill="black")
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sge\gfx.py", line 870, in draw_rectangle
_check_color(fill)
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sge\r.py", line 116, in _check_color
e = "`{}` is not a Color object.".format(repr(fill))
NameError: name 'fill' is not defined
C:\Users\Bárbara\Desktop\hexoshi>python hexoshi.py
Initializing game system...
Initializing GUI system...
Traceback (most recent call last):
File "hexoshi.py", line 5286, in <module>
xsge_gui.init()
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xsge_gui\__init__.py", line 3124, in init
"Droid Sans"], size=12)
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sge\gfx.py", line 2647, in _init_
self.size = size
File "C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\sge\gfx.py", line 2578, in size
self.rd["font"] = pygame.font.Font(name, self.__size)
OSError: unable to read font file 'C:\Users\Bárbara\AppData\Local\Programs\Python\Python36-32\lib\site-packages\xsge_gui\data\DroidSans.ttf'
C:\Users\Bárbara\Desktop\hexoshi>
C:\Users\Bárbara\Desktop\hexoshi>
|