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

issue sock.setsockopt - suggested correction #32

Open
Soraya28 opened this issue Jul 19, 2022 · 2 comments
Open

issue sock.setsockopt - suggested correction #32

Soraya28 opened this issue Jul 19, 2022 · 2 comments

Comments

@Soraya28
Copy link

sock.setsockopt(socket.SOL_SOCKET, 25, 1)

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
Copy link
Owner

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
Copy link
Author

Hi @ddetommaso

Sorry, of course.

Os : Windows 11
Python : 3.9.12

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

2 participants