Error 32 - Broken Pipe . Please Help!!

Discussion in 'Python' started by Sreenath k, Sep 4, 2012.

  1. Sreenath k

    Sreenath k Guest

    Error:


    Exception in thread Thread-1:
    Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
    File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/monitor.py", line 575, in run
    already_pickled=True)
    File "/usr/lib/python2.7/dist-packages/spyderlib/utils/bsdsocket.py", line 24, in write_packet
    sock.send(struct.pack("l", len(sent_data)) + sent_data)
    error: [Errno 32] Broken pipe

    Code :

    #code

    s=1
    f=0
    c=0

    for i in range (1,100):
    c=0
    for j in (1,i):
    s+=j
    c=0
    for k in range(1,(s/2+1)):
    #print s
    t=s%k
    if t==0:
    c+=1
    if c>=5:
    f=1
    print s
    break

    print s

    #code ends.

    The program is runnning. It has been more than 10 minutes ( currently). Should I raise my hopes for an answer ?
    Sreenath k, Sep 4, 2012
    #1
    1. Advertising

  2. Sreenath k

    Laszlo Nagy Guest

    2012.09.04. 19:08 keltezéssel, Sreenath k írta:
    > Error:
    >
    >
    > Exception in thread Thread-1:
    > Traceback (most recent call last):
    > File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    > self.run()
    > File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/monitor.py", line 575, in run
    > already_pickled=True)
    > File "/usr/lib/python2.7/dist-packages/spyderlib/utils/bsdsocket.py", line 24, in write_packet
    > sock.send(struct.pack("l", len(sent_data)) + sent_data)
    > error: [Errno 32] Broken pipe
    >
    > Code :
    >
    > #code
    >
    > s=1
    > f=0
    > c=0
    >
    > for i in range (1,100):
    > c=0
    > for j in (1,i):
    > s+=j
    > c=0
    > for k in range(1,(s/2+1)):
    > #print s
    > t=s%k
    > if t==0:
    > c+=1
    > if c>=5:
    > f=1
    > print s
    > break
    >
    > print s
    >
    > #code ends.
    >
    > The program is runnning. It has been more than 10 minutes ( currently). Should I raise my hopes for an answer ?

    It must not be your full program. The traceback shows "Thread-1" which
    indicates that you are using the threading module. The other possibility
    is that you are feeding the output of your program into another program
    with a pipeline. In that case, the exception might have occured in the
    other program, not yours.
    Laszlo Nagy, Sep 4, 2012
    #2
    1. Advertising

  3. On 9/4/2012 10:08 AM Sreenath k said...
    > Error:
    >
    >
    > Exception in thread Thread-1:
    > Traceback (most recent call last):
    > File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    > self.run()
    > File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/monitor.py", line 575, in run
    > already_pickled=True)
    > File "/usr/lib/python2.7/dist-packages/spyderlib/utils/bsdsocket.py", line 24, in write_packet
    > sock.send(struct.pack("l", len(sent_data)) + sent_data)
    > error: [Errno 32] Broken pipe
    >
    > Code :


    <snip non-relevant code to the above traceback>

    So, what code is invoking spyderlib stuff that's causing the error?

    Emile
    Emile van Sebille, Sep 4, 2012
    #3
  4. On Tuesday, 4 September 2012 22:38:03 UTC+5:30, Sreenath k wrote:
    > Error:
    >
    >
    >
    >
    >
    > Exception in thread Thread-1:
    >
    > Traceback (most recent call last):
    >
    > File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    >
    > self.run()
    >
    > File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/monitor.py", line 575, in run
    >
    > already_pickled=True)
    >
    > File "/usr/lib/python2.7/dist-packages/spyderlib/utils/bsdsocket.py", line 24, in write_packet
    >
    > sock.send(struct.pack("l", len(sent_data)) + sent_data)
    >
    > error: [Errno 32] Broken pipe
    >
    >
    >
    > Code :
    >
    >
    >
    > #code
    >
    >
    >
    > s=1
    >
    > f=0
    >
    > c=0
    >
    >
    >
    > for i in range (1,100):
    >
    > c=0
    >
    > for j in (1,i):
    >
    > s+=j
    >
    > c=0
    >
    > for k in range(1,(s/2+1)):
    >
    > #print s
    >
    > t=s%k
    >
    > if t==0:
    >
    > c+=1
    >
    > if c>=5:
    >
    > f=1
    >
    > print s
    >
    > break
    >
    >
    >
    > print s
    >
    >
    >
    > #code ends.
    >
    >
    >
    > The program is runnning. It has been more than 10 minutes ( currently). Should I raise my hopes for an answer ?


    *Please* make your variable names more descriptive.
    Ramchandra Apte, Sep 5, 2012
    #4
  5. On Tue, 4 Sep 2012 20:40:57 -0700 (PDT), Ramchandra Apte
    <> declaimed the following in
    gmane.comp.python.general:

    >
    > *Please* make your variable names more descriptive.


    No kidding... I haven't seen such cryptic names since 1972 -- an era
    when BASIC only allowed for

    A..Z{"" | 1..0}{"" | $}

    {that is, one letter, with optional single digit, with optional $ for
    string}

    --
    Wulfraed Dennis Lee Bieber AF6VN
    HTTP://wlfraed.home.netcom.com/
    Dennis Lee Bieber, Sep 5, 2012
    #5
  6. On 05/09/2012 06:33, Dennis Lee Bieber wrote:
    > On Tue, 4 Sep 2012 20:40:57 -0700 (PDT), Ramchandra Apte
    > <> declaimed the following in
    > gmane.comp.python.general:
    >
    >>
    >> *Please* make your variable names more descriptive.

    >
    > No kidding... I haven't seen such cryptic names since 1972 -- an era
    > when BASIC only allowed for
    >
    > A..Z{"" | 1..0}{"" | $}
    >
    > {that is, one letter, with optional single digit, with optional $ for
    > string}
    >


    Presumably BASIC aficianodas still insist that BASIC is the second best
    programming language in the world, with the best yet to be invented :)

    --
    Cheers.

    Mark Lawrence.
    Mark Lawrence, Sep 5, 2012
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Clive
    Replies:
    0
    Views:
    2,992
    Clive
    Aug 12, 2003
  2. Tomas Penc
    Replies:
    3
    Views:
    35,890
  3. Junhua Deng (AL/EAB)

    socket.error: (32, 'Broken pipe'): need help

    Junhua Deng (AL/EAB), Oct 27, 2005, in forum: Python
    Replies:
    1
    Views:
    1,148
    dcrespo
    Oct 27, 2005
  4. Jeremy Jones
    Replies:
    0
    Views:
    5,706
    Jeremy Jones
    Oct 27, 2005
  5. 7stud

    subprocess -- broken pipe error

    7stud, Jul 2, 2007, in forum: Python
    Replies:
    11
    Views:
    1,169
    Steve Holden
    Jul 2, 2007
Loading...

Share This Page