NeuroTechX / bci-workshop

Material for the BCI Workshop held at District 3 in May 2015 by BCI Montréal.
Other
88 stars 54 forks source link

Exercize 1 not working #5

Closed VRscience closed 7 years ago

VRscience commented 7 years ago

Hi,

i am trying to start exercize number 1, but when i run it returns me this error:

File "C:\Users\RoY\Desktop\VRscience\bci_workshop-master\mules.py", line 93, in sendcommand self.client.send(command)

TypeError: a bytes-like object is required, not 'str'

I am not a coder, i have just started learning.

edit: I fixed it by adding a b in the line: self.client.send(b'command')

Now i get this message:

Attempting connection Connection successful Header request

But no windows showing signal pop up

Thanks in advance for the help.

Cheers,

V.

rcassani commented 7 years ago

Hi, which version of Python are you using? It should be Python 2.x

VRscience commented 7 years ago

Hi, thanks for replying! I have installed Anaconda (Win 64bit) as suggested.I had python 3.6(32bit) already installed, could this matter?

rcassani commented 7 years ago

Exactly, that is the issue, the socket module is different from Python2 to Python3. I just pushed a newer version that is compatible with Python2 and 3. Try that one.

VRscience commented 7 years ago

Thanks a lot! It worked out! Could you explain me how you did it? Is it something a newbie like me could easily understand? I would like to learn how to fix this issue so i can also do it by myself.

Thanks again!

rcassani commented 7 years ago

The changes were made in the file mules.py. There are two main changes: (1) the syntax in the print function, and the input type for the functions from the module socket. You can see the changes in detail in the respective commit