openyou / emokit

Open source driver for accessing raw data from the Emotiv EPOC EEG headset
http://www.openyou.org
Other
521 stars 235 forks source link

Render.py problem: Invalid color argument #222

Closed felipefpx closed 7 years ago

felipefpx commented 7 years ago

I ran "python render.py" and I got this error:

No psyco. Expect poor performance. Not really... Initializing Emokit... Initializing Reader Thread... Initializing Writer Thread(s)... Initializing Crypto Thread... Initializing Output Thread... Crypto thread stopping. Reader stopping... Reader stopped... ('EmotivRender ', <type 'exceptions.TypeError'>, TypeError('invalid color argument',), <traceback object at 0x10a6ee950>, ' : ', TypeError('invalid color argument',))

I removed the exception threatment and the problem is on these lines: 71 if self.old_model: 72 color = str(get_quality_scale_level_color(quality, True)) 73 else: 74 color = str(get_quality_scale_level_color(quality, False))

I'm using the EPOC (first version, without Bluetooth) device and a MacMini device with MacOSX Sierra.

xribene commented 7 years ago

I have the same exactly problem but in windows 7 and EPOC with bluetooth

tallhobbes commented 7 years ago

I had this problem as well, and it seems the color needs to be a tuple, not a string. Deleting the str() wrapper around get_quality_scale_level_color(args) worked for me, since that function returns a tuple to begin with. Not sure why the string conversion is there, maybe pygame has changed its expectations? Anyway, hooray for squiggly lines!

xribene commented 7 years ago

this worked . thank you @tallhobbes

ghost commented 7 years ago

Apparently New implementation of Color was done in pygame 1.8.1.