Open pdeman opened 6 years ago
If I run the SendData.py, other linux computers receive:
BioSemi looking for an EEG stream... <pylsl.pylsl.StreamInlet instance at 0x7f58bfb717e8> 0 ((None, None), [])
Some pulls will have 0 samples. This is especially true for the first pull. Try the following:
import pylsl
print("looking for an EEG stream...")
streams = pylsl.resolve_stream('type', 'EEG')
if len(streams) > 0:
inlet = pylsl.stream_inlet(streams[0])
while True:
samples, timestamps = inlet.pull_chunk(timeout=0.0)
if len(timestamps) > 0:
print(samples.shape)
By the way, you shouldn't have to append pylsl binaries to your path.
I use Linux but I don't use Python 2.7 so I can't reproduce your error.
Try the following: After uninstalling all versions of pylsl and after building the LSL libraries, go into the liblsl-Python directory where setup.py is and do a pip install .
. Let me know if that doesn't work for you.
Also, can you tell me where you got the template for your original example? (I've since edited your example, sorry). The use of pylsl.vectorf() is legacy and is not recommended anymore.
Edit: Markdown damaged my original code. It should be fixed now.
I believe that if you set the timeout to some value greater than 0.0, pull_chunk will block until samples are available. In that case, you shouldn't have to check to see if anything has come through, and you will use much less CPU.
On 4/10/2018 4:12 PM, Chadwick Boulay wrote:
Some pulls will have 0 samples. This is especially true. Try the following:
import pylsl
print("looking for an EEG stream...") streams= pylsl.resolve_stream('type','EEG')
if len(streams)> 0: inlet= pylsl.stream_inlet(streams[0])
while True: samples, timestamps= inlet. pull_chunk(timeout=0.0) if len(timestamps)> 0: print(samples.shape)
By the way, you shouldn't have to append pylsl binaries to your path. I use Linux but I don't use Python 2.7 so I can't reproduce your error. Anyway, something you should try is, after uninstalling all versions of pylsl and after building the LSL libraries, go into the liblsl-Python directory where setup.py is and do a |pip install .|. Let me know if that doesn't work for you.
Also, can you tell me where you got the template for your original example? (I've since edited your example, sorry). The use of pylsl.vectorf() is legacy and is not recommended anymore.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/286#issuecomment-380113608, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7jbtlFEO2J10eh_DcZz9gzFnwnT0ks5tnL29gaJpZM4TOTnf.
Try the following: After uninstalling all versions of pylsl and after building the LSL libraries, go into the liblsl-Python directory where setup.py is and do a pip install .. Let me know if that doesn't work for you.
I tried that, I just did:
import pylsl print("looking for an EEG stream...") streams = pylsl.resolve_stream('type', 'EEG')
and now streams = pylsl.resolve_stream('type', 'EEG')
never end.
it doen't crash but never stop.
Hi,
we are using a actichamp (brainproduct) system on a windows computer. we started the apps/actichamp.exe on this computer.
we made a small script to listen the data streaming on linux computers:
(this code works on the windows computer, it can "listen itself". but on the linux computers we have this:
so it detects that its an actichamp but we don't get the data, what am I doing wrong ?