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

battery_values KeyError #267

Open wangwuqi opened 7 years ago

wangwuqi commented 7 years ago

the running result is as follows, and it generate a csv file 'emotiv_values_2017-07-04 22-43-55.655133.csv', but there are only 4 row data,what should i do

Initializing Emokit...
Initializing Reader Thread...
Reader detected serial number: UD201605030023AB
Initializing Writer Thread(s)...
Initializing Crypto Thread...
Initializing Output Thread...
EmotivCrypto: Generating new AES cipher.
EmotivCrypto: Serial Number - UD201605030023AB
EmotivCrypto: Generated Crypto Key from Serial Number...
   Serial Number - UD201605030023AB | is research - True 
   AES KEY - ['B', '\x00', 'A', 'H', 'B', '\x00', 'A', 'T', '3', '\x10', '2', 'B', '3', '\x00', '2', 'P']

Emokit - v0.0.8 SN: UD201605030023AB  Old Model: False
+========================================================+
| Sensor |   Value  | Quality  | Quality L1 | Quality L2 |
+--------+----------+----------+------------+------------+
|   F3   |    0     |    0     |  Nothing   |  Nothing   |
|   FC5  |    0     |    0     |  Nothing   |  Nothing   |
|   AF3  |    0     |    0     |  Nothing   |  Nothing   |
|   F7   |    0     |    0     |  Nothing   |  Nothing   |
|   T7   |    0     |    0     |  Nothing   |  Nothing   |
|   P7   |    0     |    0     |  Nothing   |  Nothing   |
|   O1   |    0     |    0     |  Nothing   |  Nothing   |
|   O2   |    0     |    0     |  Nothing   |  Nothing   |
|   P8   |    0     |    0     |  Nothing   |  Nothing   |
|   T8   |    0     |    0     |  Nothing   |  Nothing   |
|   F8   |    0     |    0     |  Nothing   |  Nothing   |
|   AF4  |    0     |    0     |  Nothing   |  Nothing   |
|   FC6  |    0     |    0     |  Nothing   |  Nothing   |
|   F4   |    0     |    0     |  Nothing   |  Nothing   |
|   X    |    0     |   N/A    |    N/A     |    N/A     |
|   Y    |    0     |   N/A    |    N/A     |    N/A     |
|   Z    |    ?     |   N/A    |    N/A     |    N/A     |
|  Batt  |    0     |   N/A    |    N/A     |    N/A     |
+--------+----------+----------+------------+------------+
|Packets Received:    2     |  Packets Processed:    0   |
|   Sampling Rate:    2     |        Crypto Rate:    0   |
+========================================================+

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python35\lib\threading.py", line 914, in _bootstrap_inner
    self.run()
  File "C:\Python35\lib\threading.py", line 862, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Python35\lib\site-packages\emokit\emotiv.py", line 298, in run
    new_packet = EmotivPacket(decrypted_task.data, timestamp=decrypted_task.timestamp)
  File "C:\Python35\lib\site-packages\emokit\packet.py", line 39, in __init__
    self.battery = battery_values[str(self.counter)]
KeyError: '206'
xribene commented 7 years ago

in ubuntu i get the similar results when a) emotiv is not close to the usb dongle so there is not good pairing. When i move close and restart the process then everything is fixed. b) When i am running a python script that uses emotiv if i terminate the program by closing the terminal instead of the right way (Ctrl-C , headset.stop()) , then the next time i run the script, i get the same KeyError: '206' . To fix this i have to remove the dongle and restart the process again. I dont know if it is the same in windows .hope it helps you

wangwuqi commented 7 years ago

I run this on win10 what's your headset manufacturing date, is my headset too new to crack?

xribene commented 7 years ago

I don't know exactly the date. I am the third owner . but for sure it is not emotiv+ . I guess the date is around 2012. I am not position to answer to your question, i have not follow all the last updates. But if you search in other issues, there are some other guys here that can help you.

On Tue, Jul 4, 2017 at 6:29 PM, wuqi notifications@github.com wrote:

I run this on win10 what's your headset manufacturing date, is my headset too new to crack?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openyou/emokit/issues/267#issuecomment-312904925, or mute the thread https://github.com/notifications/unsubscribe-auth/APFknwOShcBRpgJYFw9YuMzXNAh-YsU0ks5sKlpZgaJpZM4ONcc5 .

wangwuqi commented 7 years ago

would you mind if i can have your wechat or twitter connection . I want to have some related discussion with you.

xribene commented 7 years ago

I dont have account in any of these. Maybe you could send me pm ?

On Tue, Jul 4, 2017 at 6:47 PM, wuqi notifications@github.com wrote:

would you mind if i can have your wechat or twitter connection . I want to have some related discussion with you.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openyou/emokit/issues/267#issuecomment-312908619, or mute the thread https://github.com/notifications/unsubscribe-auth/APFkn4BEHhxah2Ga4rYh_LXG4Wc9uW1mks5sKl6ugaJpZM4ONcc5 .

pyni commented 5 years ago

Hi, i meet the same problem. Have you solved it ?