Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPv6 Interface name in socket (and quick fix) #36

Open
whyhowie opened this issue Feb 8, 2024 · 0 comments
Open

IPv6 Interface name in socket (and quick fix) #36

whyhowie opened this issue Feb 8, 2024 · 0 comments

Comments

@whyhowie
Copy link

whyhowie commented Feb 8, 2024

Hello, I was trying to connect my Tobii glasses to the computer via ethernet, and after putting in the correct device IPv6 I encountered this error:
[DEBUG]: Connecting to the Tobii Pro Glasses 2 ... Traceback (most recent call last): File "E:\noticeability-repo\other-python-code\unity_tobii_stream.py", line 25, in <module> tobiiglasses = TobiiGlassesController(ipv6_address) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\tobiiglassesctrl\controller.py", line 96, in __init__ if self.__connect__(timeout = timeout) is False: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\tobiiglassesctrl\controller.py", line 104, in __connect__ self.data_socket = self.__mksock__() ^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\site-packages\tobiiglassesctrl\controller.py", line 188, in __mksock__ sock.setsockopt(socket.SOL_SOCKET, 25, self.iface_name+'\0') TypeError: a bytes-like object is required, not 'str'

I went through controller.py, and it seems that for line 188, self.iface_name+'\0' should be self.iface_name.encode()` instead for proper byte-like encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant