Emotiv / cortex-example

Example with Cortex V2/V3 API
https://emotiv.com
MIT License
194 stars 113 forks source link

Stuck at executing https://github.com/Emotiv/cortex-v2-example/blob/master/python/sub_data.py #179

Closed vishwasdalal closed 2 years ago

vishwasdalal commented 2 years ago

I do not have the license to the raw data stream, I want to access the free APIs I made the following changes to https://github.com/Emotiv/cortex-v2-example/blob/master/python/sub_data.py

list data streams

streams = ['mot','met','pow', 'dev']
s.start(streams)

My python is stuck at this unnamed

tungntEmotiv commented 2 years ago

Hi @vishwasdalal ,

I think the problem might from missing a python lib such as python-dispatch or something wrong when receive response message from websoscket. So

1) do you install python-dispatch via "pip install python-dispatch" ? 2) Please add a debug log to on_message function at cortex.py as below? And let us know the result def on_message(self, *args): recv_dic = json.loads(args[1]) print( recv_dic) if 'sid' in recv_dic: Thanks

vishwasdalal commented 2 years ago

hi @tungntEmotiv 1.do you install python-dispatch via "pip install python-dispatch" ?

vishwasdalal commented 2 years ago

Hi @tungntEmotiv

image

this is where this shows up, this is in threading.py cortex.py line 107 calls this self.websock_thread .start()