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
idle: Errno 10035 a non-blocking socket operation could not be completed immediately #70926
Comments
So far I've got past the "bug in program" stage of debugging, but this came up:
IDLE internal error in runcode()
Traceback (most recent call last):
File "C:\Python27\lib\idlelib\rpc.py", line 235, in asyncqueue
self.putmessage((seq, request))
File "C:\Python27\lib\idlelib\rpc.py", line 332, in putmessage
n = self.sock.send(s[:BUFSIZE])
error: [Errno 10035] A non-blocking socket operation could not be completed immediately
I have no idea what a "socket" is so if you know please tell me! |
Michael, when you open an issue, you need to stay nosy so we can ask questions. This is especially true when the issue involved 3rd party modules, like pygame, and even more, when personal files, like the images, are required. In this case:
1.Does your program run correctly when you run it directly with python from the console, with "python pathto/Skier"?
[A 'socket' is a class abstraction used to communicate between different processes. It is usually used for processes on different machines, as with the browser process on your machine and a server process on another machine, but can be used for two processes on the same machine.] -- |
|
On the command line, after the ...> prompt, enter "python patth/to/Skier.py". Or, maybe, find Skier.py in Windows Explorer, and either double click or right-click and select "Run". (I am not sure if this works with 2.7.5 on Vista.) |
Is the command prompt itself admin? |
No, admin privileges should not be needed to run Command Prompt. Ditto for python if you did not already need same to run IDLE. |
Hi there. From what I can see in this error description, we are dealing with real non-blocking IO, i.e. an application is using select and non-blocking sockets. It is possible that this windows edge case is now being elevated into the application code and whatever select() logic being used in rpc.py needs to be aware of it, or that for some reason this socket is supposed to be blocking, but isn't. I'll have a quick look at idlelib and see if I can see anything. |
Caveat emptor: I know nothing of IDLE, and I even suspect it to be dead or dying code. Non the less, it could be patched. I found this in the code: If the socket were non-blocking, this would be the place to add a handler to catch socket.error with errno=errno.EWOULDBLOCK However, I can't see that this socket is non-blocking. Perhaps I have some blindness, but the select calls seem to be redundant to me, I can't see any sock.setblocking(False) or sock.settimeout(0.0) being done anywhere. Having said that, the following change can be made (which is the prudent way to use select/send anyway) |
Kristján, thank you for the response. The socket communication part of IDLE is pretty much a black box to me. Just to clarify, you are saying that select polling is only needed for non-blocking sockets; sockets are blocking by default; and you see no override of the default. Me neither. It would be nice to know. Idlelib.PyShell has the following lines: (IDLE is very much in use, and I hope to modernize the 3.x version, and perhaps replace the sockets with non-blocking use of pipes.) Michael: I cannot change 2.7.5 and I am not inclined to change 2.7.12+ until I know there is a problem with the current 2.7 release. Numerous people are using IDLE with 2.7.11 (and 3.x) on Windows without problems. |
I think that the select.select calls there are a red herring, since I see no evidence that the rpc socket is ever put in non-blocking mode. I'll have another look at that code and see if thera are any loopholes. Also, Micahel could try commenting out this line in and see if the problem goes away. |
Kristján, when you say 'dead or dying code', it worries me a lot. Can you tell me what you mean because I do NOT want to reinstall IDLE. |
I also do not want to change something in the /lib folder because that is like going into the Windows Registry and 'fixing' a bunch of stuff. I've made other games with PyGame and they generate errno 10035, too. |
If you're still using 2.7.5, we can't help you. If you can reproduce the issue with 2.7.11 or 3.5.1, please reopen. |
Michael, IDLE is not dead, and I am working steadily to modernize it inside and out for 3.6. There have even been improvements for 2.7 since 2.7.5. For his work, Kristján has had no reason to keep up to date on IDLE's progress. |
Hi there, everyone. Michael, please understand that python developers are volunteers and sometimes need help to fix things. In this case, we have not been able to reproduce the problem, and are not sure what can be causing it. My suggestion for you to modify code would be a step in identifying and diagnosing the problem. Without such feedback it is hard to accomplish anything. Cheers! |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: