Quote:
Originally Posted by sorrow
Ok. I've had a better look at this... and it shouldn't fail.
Can you make sure the code for get_default_font looks like:
Code:
def get_default_font(self, site = 'PokerStars'):
(font, font_size) = ("Sans", "8")
if site not in self.supported_sites:
return ("Sans", "8")
if self.supported_sites[site].font == "":
font = "Sans"
else:
font = self.supported_sites[site].font
The highlighted lines might have been added after the last official release.
Sorrow
Edit: Forgot to mention - site_path isn't actually used anywhere so I wouldn't worry about it.
Ok, we're getting somewhere. That code wasn't in my Configuration.py. I added it, and now the error has jumped to the colors section.
Code:
HUD_main starting
Using db name = fpdb
C:\Python26\lib\site-packages\MySQLdb\__init__.py:34: DeprecationWarning: the sets module is deprecated
from sets import ImmutableSet
Unhandled exception in thread started by <bound method HUD_main.read_stdin of <__main__.HUD_main object at 0x012A2810>>
Traceback (most recent call last):
File "HUD_main.py", line 196, in read_stdin
self.create_HUD(new_hand_id, tablewindow, temp_key, max, poker_game, stat_dict, cards)
File "HUD_main.py", line 112, in create_HUD
self.hud_dict[table_name] = Hud.Hud(self, table, max, poker_game, self.config, self.db_connection)
File "C:\Program Files\fpdb\pyfpdb\Hud.py", line 79, in __init__
self.colors = config.get_default_colors(self.table.site)
File "C:\Program Files\fpdb\pyfpdb\Configuration.py", line 549, in get_default_colors
if self.supported_sites[site].hudopacity == "":
KeyError: None
Exception KeyError: KeyError(9472,) in <module 'threading' from 'C:\Python26\lib\threading.pyc'> ignored
I still get no overlay, and my HUD Main window looks like this:
So, I put this in the get_default_colors section, and commented out all the other if/else statements:
Code:
if site not in self.supported_sites:
colors['hudopacity'] = 1.0
colors['hudbgcolor'] = "#000000"
colors['hudfgcolor'] = "#FFFFFF"
Now, my HUD main window looks like this:
And I have the beginnings of my HUD overlay, with only this:
But no other parts of the HUD overlay.
So....it appears to me that it is not identifying the site for some reason, as the HUD main window above shows "None - <Tablename>", instead of "Pokerstars - <Tablename>". Also, by having to change the Configuration.py to tell it how to react "if site is not in supported_sites". Interesting too, is before I changed the bg and fg colors manually in Configuration.py, it was a white bg, and black fg. My HUD_config.xml is set for a black bg, and white fg. It doesn't appear it's reading my HUD_config.xml file for some reason.
The errors now are related to seat position, so I'm sure I could go hack on Hud.py and make this somehow work, by hard coding everything, but I want to make it work the correct way.
But I can verify it IS reading at least parts of the HUD_config.xml, because if I change my DB password, it fails to run with an error of "access denied" on the DB. So, it just appears to be something with the "site", or "supported_sites" of the HUD_config.xml file.
Does that make sense? Am I getting close?
Last edited by BirdRacer; 10-21-2009 at 10:41 AM.