Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78878 > unrolled thread
| Started by | karthik.sharma@gmail.com |
|---|---|
| First post | 2014-10-08 23:16 -0700 |
| Last post | 2014-10-10 07:57 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.python
ZMQError: Resource temporarily unavailable karthik.sharma@gmail.com - 2014-10-08 23:16 -0700
Re: ZMQError: Resource temporarily unavailable dieter <dieter@handshake.de> - 2014-10-10 07:57 +0200
| From | karthik.sharma@gmail.com |
|---|---|
| Date | 2014-10-08 23:16 -0700 |
| Subject | ZMQError: Resource temporarily unavailable |
| Message-ID | <0ac40dbc-105b-42d4-91f8-d0937bad30cf@googlegroups.com> |
I am using zero-mq for IPC between two machines.
My zmq function is given below
def recieve_messages(self):
string = self.sub_socket.recv(flags=zmq.NOBLOCK)
print('flow mod messages recieved {}'.format(string))
When I run the program however I get the following error.
string = self.sub_socket.recv(flags=zmq.NOBLOCK)
File "socket.pyx", line 616, in zmq.core.socket.Socket.recv (zmq/core/socket.c:5961)
File "socket.pyx", line 650, in zmq.core.socket.Socket.recv (zmq/core/socket.c:5832)
File "socket.pyx", line 119, in zmq.core.socket._recv_copy (zmq/core/socket.c:1669)
ZMQError: Resource temporarily unavailable
Can someone explain what is likely causing this error.
[toc] | [next] | [standalone]
| From | dieter <dieter@handshake.de> |
|---|---|
| Date | 2014-10-10 07:57 +0200 |
| Message-ID | <mailman.14738.1412920684.18130.python-list@python.org> |
| In reply to | #78878 |
karthik.sharma@gmail.com writes:
> I am using zero-mq for IPC between two machines.
>
> My zmq function is given below
>
> def recieve_messages(self):
> string = self.sub_socket.recv(flags=zmq.NOBLOCK)
> print('flow mod messages recieved {}'.format(string))
>
>
> When I run the program however I get the following error.
>
> string = self.sub_socket.recv(flags=zmq.NOBLOCK)
> File "socket.pyx", line 616, in zmq.core.socket.Socket.recv (zmq/core/socket.c:5961)
> File "socket.pyx", line 650, in zmq.core.socket.Socket.recv (zmq/core/socket.c:5832)
> File "socket.pyx", line 119, in zmq.core.socket._recv_copy (zmq/core/socket.c:1669)
> ZMQError: Resource temporarily unavailable
>
>
> Can someone explain what is likely causing this error.
The most likely cause is that you try to receive data while there
is none available. Usually, with non blocking operations, you
start them only after you know they can succeed. If the operation
is impossible, you will get an exception (and "Resource temporarily
unavailable" seems a good candidate).
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web