bugxSGE - Bugs: bug #50581, [Windows] NameError: name 'fill'...

 
 

bug #50581: [Windows] NameError: name 'fill' is not defined

Submitted by:  None
Submitted on:  Sat 18 Mar 2017 08:00:59 PM UTC  
 
Category: xsge.guiSeverity: 3 - Normal
Status: InvalidAssigned to: None
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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. :)

Julie Marchant <onpon4>
Project Administrator
Sun 19 Mar 2017 12:22:12 AM UTC, comment #1:

This sounds to me like a problem with your Pygame installation. Is it possible you built it without ttf support?

Anonymous
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>

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by onpon4 (Posted a comment)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 19 Mar 2017 02:52:57 AM UTConpon4StatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1