Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#71 error: (10053, 'Software caused connection abort')

open
nobody
None
5
2005-06-28
2005-06-28
Anonymous
No

I am trying to use the smtplib within a compiled
application. When in script form, everything works but
as soon as this library is compiled into an exe and I run
the program I get the above error.

I have striped everything out only leaving the smtplib
tescase and I have not been able to get this library to
execute normally.

My name is Pierre and I can be reached at this
address: ve2caz@hotmail.com

Thanks,
Pierre

Discussion

  • This archive contains a testcase using 3 files

     
    Attachments
  • Logged In: NO

    I forgot to add that the batch file within the archive provides
    the software environment information and I am running on
    Windows XP.

    Cheers,
    Pierre

     
  • Thomas Heller
    Thomas Heller
    2005-06-29

    Logged In: YES
    user_id=11105

    I just checked your example, and it works for me (seems
    your script needs an SMTP server running on the local
    machine - right? I have tunneled the SMTP port to a linux
    machine where an SMTP server is running).

    Could it be a XP firewall issue?
    Can you post the output of the exe here?

     
  • Thomas Heller
    Thomas Heller
    2005-06-29

    Logged In: YES
    user_id=11105

    It may also be useful to look into the SMTP server logfiles.

     
  • Logged In: NO

    Hello,

    Thank you for you're involvement.

    I do not have access to the SMTP server logs.

    The testcase I have provided was diminished to its lowest
    common denominator to demonstrate the error but I have tried
    with different servers on different machines with the same
    results.

    I do have a personal firewall at home and we have a company
    firewall at work with VPN software that has a builtin firewall
    installed on the work laptops.

    Here is the result of running the batchfile:

    S:\smtp>rem ActivePython-2.3.2-232-win32-ix86.msi
    S:\smtp>rem pywin32-200.win32-py2.3.exe
    S:\smtp>rem py2exe-0.5.3.win32-py2.3.exe
    S:\smtp>python test_email_setup.py py2exe
    running py2exe
    creating S:\smtp\build
    creating S:\smtp\build\bdist.win32
    creating S:\smtp\build\bdist.win32\winexe
    creating S:\smtp\build\bdist.win32\winexe\collect
    creating S:\smtp\build\bdist.win32\winexe\temp
    creating S:\smtp\dist
    *** searching for required modules ***
    *** parsing results ***
    creating python loader for extension 'datetime'
    creating python loader for extension '_winreg'
    creating python loader for extension '_sre'
    creating python loader for extension '_socket'
    *** finding dlls needed ***
    *** create binaries ***
    *** byte compile python files ***
    byte-compiling D:\_software\Python23\lib\StringIO.py to
    StringIO.pyc
    byte-compiling D:\_software\Python23\lib\UserDict.py to
    UserDict.pyc
    byte-compiling D:\_software\Python23\lib\__future__.py to
    __future__.pyc
    byte-compiling D:\_software\Python23\lib\_strptime.py to
    _strptime.pyc
    byte-compiling D:\_software\Python23\lib\atexit.py to
    atexit.pyc
    byte-compiling D:\_software\Python23\lib\base64.py to
    base64.pyc
    byte-compiling D:\_software\Python23\lib\calendar.py to
    calendar.pyc
    byte-compiling D:\_software\Python23\lib\codecs.py to
    codecs.pyc
    byte-compiling D:\_software\Python23\lib\copy.py to copy.pyc
    byte-compiling D:\_software\Python23\lib\copy_reg.py to
    copy_reg.pyc
    byte-compiling D:\_software\Python23\lib\dummy_thread.py
    to dummy_thread.pyc
    byte-compiling D:\_software\Python23\lib\email\Charset.py to
    email\Charset.pyc
    creating S:\smtp\build\bdist.win32\winexe\collect\email
    byte-compiling D:\_software\Python23\lib\email\Encoders.py
    to email\Encoders.pyc
    byte-compiling D:\_software\Python23\lib\email\Errors.py to
    email\Errors.pyc
    byte-compiling D:\_software\Python23\lib\email\Generator.py
    to email\Generator.pyc
    byte-compiling D:\_software\Python23\lib\email\Header.py to
    email\Header.pyc
    byte-compiling D:\_software\Python23\lib\email\Message.py
    to email\Message.pyc
    byte-compiling D:\_software\Python23\lib\email\Parser.py to
    email\Parser.pyc
    byte-compiling D:\_software\Python23\lib\email\Utils.py to
    email\Utils.pyc
    byte-compiling D:\_software\Python23\lib\email\__init__.py to
    email\__init__.pyc
    byte-compiling D:\_software\Python23
    \lib\email\_compat21.py to email\_compat21.pyc
    byte-compiling D:\_software\Python23
    \lib\email\_compat22.py to email\_compat22.pyc
    byte-compiling D:\_software\Python23
    \lib\email\_parseaddr.py to email\_parseaddr.pyc
    byte-compiling D:\_software\Python23
    \lib\email\base64MIME.py to email\base64MIME.pyc
    byte-compiling D:\_software\Python23
    \lib\email\quopriMIME.py to email\quopriMIME.pyc
    byte-compiling D:\_software\Python23
    \lib\encodings\__init__.py to encodings\__init__.pyc
    creating S:\smtp\build\bdist.win32\winexe\collect\encodings
    byte-compiling D:\_software\Python23
    \lib\encodings\aliases.py to encodings\aliases.pyc
    byte-compiling D:\_software\Python23\lib\ftplib.py to ftplib.pyc
    byte-compiling D:\_software\Python23\lib\getopt.py to
    getopt.pyc
    byte-compiling D:\_software\Python23\lib\getpass.py to
    getpass.pyc
    byte-compiling D:\_software\Python23\lib\gopherlib.py to
    gopherlib.pyc
    byte-compiling D:\_software\Python23\lib\hmac.py to
    hmac.pyc
    byte-compiling D:\_software\Python23\lib\httplib.py to
    httplib.pyc
    byte-compiling D:\_software\Python23\lib\linecache.py to
    linecache.pyc
    byte-compiling D:\_software\Python23\lib\locale.py to
    locale.pyc
    byte-compiling D:\_software\Python23\lib\macpath.py to
    macpath.pyc
    byte-compiling D:\_software\Python23\lib\macurl2path.py to
    macurl2path.pyc
    byte-compiling D:\_software\Python23\lib\mimetools.py to
    mimetools.pyc
    byte-compiling D:\_software\Python23\lib\mimetypes.py to
    mimetypes.pyc
    byte-compiling D:\_software\Python23\lib\ntpath.py to
    ntpath.pyc
    byte-compiling D:\_software\Python23\lib\nturl2path.py to
    nturl2path.pyc
    byte-compiling D:\_software\Python23\lib\os.py to os.pyc
    byte-compiling D:\_software\Python23\lib\os2emxpath.py to
    os2emxpath.pyc
    byte-compiling D:\_software\Python23\lib\popen2.py to
    popen2.pyc
    byte-compiling D:\_software\Python23\lib\posixpath.py to
    posixpath.pyc
    byte-compiling D:\_software\Python23\lib\quopri.py to
    quopri.pyc
    byte-compiling D:\_software\Python23\lib\random.py to
    random.pyc
    byte-compiling D:\_software\Python23\lib\re.py to re.pyc
    byte-compiling D:\_software\Python23\lib\repr.py to repr.pyc
    byte-compiling D:\_software\Python23\lib\rfc822.py to
    rfc822.pyc
    byte-compiling D:\_software\Python23\lib\smtplib.py to
    smtplib.pyc
    byte-compiling D:\_software\Python23\lib\socket.py to
    socket.pyc
    byte-compiling D:\_software\Python23\lib\sre.py to sre.pyc
    byte-compiling D:\_software\Python23\lib\sre_compile.py to
    sre_compile.pyc
    byte-compiling D:\_software\Python23\lib\sre_constants.py to
    sre_constants.pyc
    byte-compiling D:\_software\Python23\lib\sre_parse.py to
    sre_parse.pyc
    byte-compiling D:\_software\Python23\lib\stat.py to stat.pyc
    byte-compiling D:\_software\Python23\lib\string.py to
    string.pyc
    byte-compiling D:\_software\Python23\lib\tempfile.py to
    tempfile.pyc
    byte-compiling D:\_software\Python23\lib\traceback.py to
    traceback.pyc
    byte-compiling D:\_software\Python23\lib\types.py to
    types.pyc
    byte-compiling D:\_software\Python23\lib\urllib.py to urllib.pyc
    byte-compiling D:\_software\Python23\lib\urlparse.py to
    urlparse.pyc
    byte-compiling D:\_software\Python23\lib\uu.py to uu.pyc
    byte-compiling D:\_software\Python23\lib\warnings.py to
    warnings.pyc
    byte-compiling S:\smtp\build\bdist.win32
    \winexe\temp\_socket.py to _socket.pyc
    byte-compiling S:\smtp\build\bdist.win32
    \winexe\temp\_sre.py to _sre.pyc
    byte-compiling S:\smtp\build\bdist.win32
    \winexe\temp\_winreg.py to _winreg.pyc
    byte-compiling S:\smtp\build\bdist.win32
    \winexe\temp\datetime.py to datetime.pyc
    *** copy extensions ***
    copying D:\_software\Python23\DLLs\_socket.pyd ->
    S:\smtp\dist
    copying D:\_software\Python23\DLLs\_sre.pyd -> S:\smtp\dist
    copying D:\_software\Python23\DLLs\_winreg.pyd ->
    S:\smtp\dist
    copying D:\_software\Python23\DLLs\datetime.pyd ->
    S:\smtp\dist
    *** copy dlls ***
    copying C:\WINDOWS\system32\python23.dll -> S:\smtp\dist
    copying D:\_software\Python23\w9xpopen.exe -> S:\smtp\dist
    setting sys.winver for 'S:\smtp\dist\python23.dll' to 'py2exe'
    copying D:\_software\Python23\Lib\site-
    packages\py2exe\run.exe -> S:\smtp\dist\test_email.
    exe
    The following modules appear to be missing
    ['_ssl']

    S:\smtp>cd dist
    S:\smtp\dist>test_email.exe
    connect: ('localhost', 25)
    connect: ('localhost', 25)
    connect fail: ('localhost', 25)
    Traceback (most recent call last):
    File "test_email.py", line 4, in ?
    File "smtplib.pyc", line 302, in connect
    socket.error: (10053, 'Software caused connection abort')
    S:\smtp\dist>cd ..
    S:\smtp>test_email.py
    connect: ('localhost', 25)
    connect: ('localhost', 25)
    reply: '220 WOTTARCHAMBP.ent.ad.cognos.com Microsoft
    ESMTP MAIL Service, Version: 6.0.2600.2180 read
    y at Wed, 29 Jun 2005 13:41:38 -0400 \r\n'
    reply: retcode (220); Msg:
    WOTTARCHAMBP.ent.ad.cognos.com Microsoft ESMTP
    MAIL Service, Version: 6.0
    .2600.2180 ready at Wed, 29 Jun 2005 13:41:38 -0400
    connect: WOTTARCHAMBP.ent.ad.cognos.com Microsoft
    ESMTP MAIL Service, Version: 6.0.2600.2180 ready a
    t Wed, 29 Jun 2005 13:41:38 -0400
    S:\smtp>pause
    Press any key to continue . . .

    Thank you,
    Pierre