ddetommaso / TobiiGlassesPyController

Tobii Pro Glasses 2 Python controller
GNU General Public License v3.0
56 stars 28 forks source link

issue sock.setsockopt - suggested correction #32

Open Soraya28 opened 2 years ago

Soraya28 commented 2 years ago

https://github.com/ddetommaso/TobiiGlassesPyController/blob/11542ba0c4a08152c27a7d738f7a2e002c97f407/tobiiglassesctrl/controller.py#L193

Hi everyone,

Thanks a lot for this very useful toolbox.

I have come across an issue line 193 that I have corrected, see below. Otherwise, everything is working fine !

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

Correction suggested : sock.setsockopt(socket.SOL_SOCKET, 25, (self.iface_name+'\0').encode())

ddetommaso commented 2 years ago

Hi @Soraya28,

many thanks for your suggestion. Please can you tell us the operating system and the Python version in which you encountered the issue?

Soraya28 commented 2 years ago

Hi @ddetommaso

Sorry, of course.

Os : Windows 11 Python : 3.9.12