Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15903

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

Date 2011-11-18 16:55 +0000
From MRAB <python@mrabarnett.plus.com>
Subject Re: Why sock.bind is always report 10048 error when in a script with multiprocessing
References <12715937.830.1321611809592.JavaMail.geo-discussion-forums@yqoo7> <mailman.2829.1321630394.27778.python-list@python.org> <14330307.286.1321631316567.JavaMail.geo-discussion-forums@yqcm23>
Newsgroups comp.lang.python
Message-ID <mailman.2835.1321635315.27778.python-list@python.org> (permalink)

Show all headers | View raw


On 18/11/2011 15:48, Junfeng Hu wrote:
> Thanks
> Yes, I had tried this before, so you could find that I comment the line
> sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
> Here is the results.
> D:\Python test>mythread2.py
> Traceback (most recent call last):
>    File "<string>", line 1, in<module>
>    File "C:\Python27\lib\multiprocessing\forking.py", line 347, in main
>      self = load(from_parent)
>    File "C:\Python27\lib\pickle.py", line 1378, in load
>      return Unpickler(file).load()
>    File "C:\Python27\lib\pickle.py", line 858, in load
>      dispatch[key](self)
>    File "C:\Python27\lib\pickle.py", line 1133, in load_reduce
>      value = func(*args)
>    File "C:\Python27\lib\multiprocessing\reduction.py", line 167, in rebuild_sock
> et
>      _sock = fromfd(fd, family, type_, proto)
>    File "C:\Python27\lib\multiprocessing\reduction.py", line 156, in fromfd
>      s = socket.fromfd(fd, family, type_, proto)
> AttributeError: 'module' object has no attribute 'fromfd'

The documentation for socket.fromfd says:

     Availability: Unix.

You're using Microsoft Windows.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 02:23 -0800
  Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:20 -0800
  Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 02:33 +1100
    Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:48 -0800
    Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:48 -0800
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:51 -0800
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:51 -0800
        Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 03:04 +1100
          Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 08:11 -0800
          Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 08:11 -0800
            Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 03:16 +1100
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing MRAB <python@mrabarnett.plus.com> - 2011-11-18 16:55 +0000
        Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 18:45 -0800

csiph-web