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

WinError 10038 in client #5

Open
r4nx opened this issue Mar 25, 2018 · 2 comments
Open

WinError 10038 in client #5

r4nx opened this issue Mar 25, 2018 · 2 comments

Comments

@r4nx
Copy link

r4nx commented Mar 25, 2018

When I try to run the client, I am getting an error:

$ pychat_client.py 127.0.0.1
Connected to server

Traceback (most recent call last):
  File "C:\Users\Admin\Desktop\pychat-master\pychat_client.py", line 24, in <module>
    read_sockets, write_sockets, error_sockets = select.select(socket_list, [], [])
OSError: [WinError 10038] An operation was attempted on something that is not a socket

Server is runned.
OS: Windows 10 Pro
Python 3.6.4

@parikshitsharma70
Copy link

Replace your select.select line with the following lines of code:

    ready_to_read = select.select([s], [], [], 1)[0]
    import msvcrt
    if msvcrt.kbhit(): ready_to_read.append(sys.stdin)

@kylliancop
Copy link

you can send the code mud edit

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

3 participants