gaelen / python-egi

4 stars 5 forks source link

errors arising from struct.pack(fmt, key, *args) #3

Open giuliagennari opened 7 years ago

giuliagennari commented 7 years ago

Bonjour,

I am having big troubles sending events to the NetStation. I am using Expyriment with Python 3.6. The connection between the two computers is established with no issues with egi.simple [through the commands: ns = egi.Netstation() and ns.connect('132.166.140.251', 55513) ]. However, as soon as I try to begin a session [ ns.BeginSession() ] the following error comes up:

File "C:/Users/Inserm/Desktop/Giulia_pilot/baby_pilot_with_markers_v3.py", line 50, in ns.BeginSession()

File "C:\Users\Inserm\Anaconda3\lib\site-packages\egi\simple.py", line 645, in BeginSession message = self._fmt.pack('Q', self._system_spec)

File "C:\Users\Inserm\Anaconda3\lib\site-packages\egi\simple.py", line 247, in pack result = struct.pack(fmt, key, *args)

error: char format requires a bytes object of length 1

The same exact error appears when I try to send an event [ for example ns.send_event('ev22', timestamp=egi.ms_localtime()) ] We are really stuck with this problem, didn't manage to find where the problem is in the code. Would you maybe be able to help us?

Thank you very much in advance!