Particle Panel crash on start + my solution

I couldn’t start up Particle Panel since Python Mega Widgets crashed during startup.
The problem seems to lie with PMW and not with panda but I couldn’t find any forum for PMW to ask anyone about it so I figured I post my solution here instead. Anyway here’s the stack trace when trying to start up :

Traceback (most recent call last):
File “”, line 30, in
pp = ParticlePanel() # Create the panel
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\direct\tkpanels\”, line 68, in init
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\direct\tkwidgets\”, line 100, in init
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\direct\tkwidgets\”, line 122, in __createInterface
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\direct\tkpanels\”, line 202, in createInterface
self.mainNotebook = Pmw.NoteBook(interior)
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\Pmw\Pmw_2_0_1\lib\”, line 60, in init
File “C:\Users\wew\AppData\Local\Programs\Python\Python35\lib\site-packages\Pmw\Pmw_2_0_1\lib\”, line 361, in bordercolors
‘#%04x%04x%04x’ % (lightRGB[0], lightRGB[1], lightRGB[2]),
TypeError: %x format: an integer is required, not float

As you can see the problem is that python expects lightRGB[0], lightRGB[1] and lightRGB[2] to be of type integer but they are actually floats.
So my simple fix is then to go into the file at

At line 361 we find:

return (
    '#%04x%04x%04x' % (lightRGB[0],lightRGB[1], lightRGB[2]),
    '#%04x%04x%04x' % (darkRGB[0], darkRGB[1], darkRGB[2])

here I just cast the values into integers:

return (
    '#%04x%04x%04x' % (int(lightRGB[0]),int(lightRGB[1]), int(lightRGB[2])),
    '#%04x%04x%04x' % (int(darkRGB[0]), int(darkRGB[1]), int(darkRGB[2]))

and save the file.

After this ParticlePanel started up just fine.
I know most of you would spot and fix this problem in an instant but for other dummies out there like myself I hope this could be helpful.