Coder Social home page Coder Social logo

AssertionError about emokit HOT 14 CLOSED

openyou avatar openyou commented on July 28, 2024
AssertionError

from emokit.

Comments (14)

cminus avatar cminus commented on July 28, 2024

Hi, I am a newby in python so I'm not sure of what I've really done but I succeeded to make it run by changing the code this way :

def setupWin(self, headsetId):
filter = hid.HidDeviceFilter(vendor_id=0x21a1, product_name='EPOC BCI')
devices = []
devices = filter.get_devices()
assert len(devices) > headsetId
self.device = devices[headsetId]
self.device.open()
feature = self.device.find_feature_reports()
self.setupCrypto(self.device.serial_number, feature

Ask me if it still doesn't work I may have changed a few other things, but it shall work this way.

from emokit.

UWjuan avatar UWjuan commented on July 28, 2024

Thanks for the help!!

I still get the same error though.

Do you think this is a problem with the code not seeing the headset?
The devices array is empty when filter.get_devices is called.

from emokit.

cminus avatar cminus commented on July 28, 2024

Is your USB stick for emotiv on your computer? Try to launch the read.py file and let me know.

from emokit.

cminus avatar cminus commented on July 28, 2024

You can also try to rigth this in your main (I just added a few prints). It will allow you to see if the headset is detected (actually, it is just the stick here that is detected, no need to light your headset up)

if device.product_name == 'Brain Waves':
devices.append(device)
device.open()
device.set_raw_data_handler(sample_handler)
print ('Brain Waves found')
print(sample_handler)
elif device.product_name == 'EPOC BCI':
devices.append(device)
device.open()
device.set_raw_data_handler(bci_handler)
print ('EOPC BCI found')
print (bci_handler )
print('\n')
print (device)
#at this point, if the code returns informations about your headset, you can try to write:
#from emotiv import Emotiv
#e=Emotiv()

from emokit.

cminus avatar cminus commented on July 28, 2024

Sorry, it's in read.py's main that you wil find these lines.

from emokit.

UWjuan avatar UWjuan commented on July 28, 2024

Nothing happens. On the read.py script it just goes into the while loop without printing anything.

Where did you get the pywinusb stack?
I had to pretty much manually build it from source code I found online (http://pydoc.net/pywinusb/0.2.7/pywinusb) since the links aren't working for the google code.
Since this is pretty much what talks to the usb device I think there can be an error there.

Once again thanks for the quick help!!

-- Juan

from emokit.

UWjuan avatar UWjuan commented on July 28, 2024

Nevermind!!
I found the new version of pywinusb.

Still no luck though.

from emokit.

cminus avatar cminus commented on July 28, 2024

Are you working on linux or on windows? For me, it is windows 7.

You can write the following linne in your code, it will allow to stop the script and gives you access to the console in your IDLE. You can then type anything you want and check the values of some variables such as the value of your headset. But type the line at the right place or you won't be able to access the variables.

Sorry, I don't know much about your problem...

from emokit.

UWjuan avatar UWjuan commented on July 28, 2024

Sorry but what line of code?

from emokit.

cminus avatar cminus commented on July 28, 2024

Sorry, I forgot :)

import code; code.interact(local=locals())

from emokit.

cminus avatar cminus commented on July 28, 2024

Hi, sorry, I've seen your message only today. Actually, I've rewritten
something else to make the code run, using some parts of the code that I
understood. For me, it works but it can be improved.

you will find my code as attachement.

run extract to get the raw datas from the headset and extract 14 to get
the signal from the electrode. As you will see, pygame is very very
slow. Maybe you will find how to fix it. I am not on the project anymore
for a month bur I will still be glad to help if you need.

Cheers

On 11/07/2012 23:32, UWjuan wrote:

Sorry but what line of code?


Reply to this email directly or view it on GitHub:
https://github.com/qdot/emokit/issues/21#issuecomment-6920429

from emokit.

 avatar commented on July 28, 2024

Hi, I am having the same problem. UWJuan were you able to fix this? cminus where is the attachment?

Thanks,
Urvish

from emokit.

qdot avatar qdot commented on July 28, 2024

Closing as dupe of #37, where we'll hopefully just overhaul things completely.

from emokit.

cminus avatar cminus commented on July 28, 2024

On 23/09/2012 07:56, urvishparikh wrote:

Hi, I am having the same problem. UWJuan were you able to fix this?
cminus where is the attachment?

Thanks,
Urvish


Reply to this email directly or view it on GitHub
https://github.com/qdot/emokit/issues/21#issuecomment-8795684.

Hi, I have finally chosen to use an other way to extract the datas, here
is the code I used, but I still have a few problems of connexion. It
only works when I launch the code before I put the headset on my head.
The rigth code is extract14.

Rémy.

from emokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.