urllib2.urlopen() crashes on Windows 2008 Server

Ulli Horlacher framstag at rus.uni-stuttgart.de
Fri Dec 4 08:00:32 EST 2015


Dennis Lee Bieber <wlfraed at ix.netcom.com> wrote:

> >I have a Python2 program which runs fine on Windows 7, but
> >crashes on Windows 2008 Server R2 64 bit:
> >
> >downloading http://fex.belwue.de/download/7za.exe
> >Traceback (most recent call last):
> >  File "<string>", line 1992, in <module>
> >  File "<string>", line 180, in main
> >  File "<string>", line 329, in get_ID
> >  File "<string>", line 1627, in check_7z
> >  File "C:\Software\Python\lib\urllib2.py", line 154, in urlopen
> >  File "C:\Software\Python\lib\urllib2.py", line 431, in open
> >  File "C:\Software\Python\lib\urllib2.py", line 449, in _open
> >  File "C:\Software\Python\lib\urllib2.py", line 409, in _call_chain
> >  File "C:\Software\Python\lib\urllib2.py", line 1227, in http_open
> >  File "C:\Software\Python\lib\urllib2.py", line 1200, in do_open
> >  File "C:\Software\Python\lib\httplib.py", line 1132, in getresponse
> >  File "C:\Software\Python\lib\httplib.py", line 485, in begin
> >  File "C:\Software\Python\lib\mimetools.py", line 25, in __init__
> >  File "C:\Software\Python\lib\rfc822.py", line 108, in __init__
> >  File "C:\Software\Python\lib\httplib.py", line 319, in readheaders
> >  File "C:\Software\Python\lib\socket.py", line 480, in readline
> >error: [Errno 10054] Eine vorhandene Verbindung wurde vom Remotehost geschlossen
> >
> 
> Per MSDN:
> """
> WSAECONNRESET
> 10054
> 
>         
> 
> Connection reset by peer.
> 
>     An existing connection was forcibly closed by the remote host. 

This is not true.
The server is under my control. Die client has terminated the connection
(or a router between).


How can I trap this within the python program?
I see no exception.


-- 
Ullrich Horlacher              Server und Virtualisierung
Rechenzentrum IZUS/TIK         E-Mail: horlacher at tik.uni-stuttgart.de
Universitaet Stuttgart         Tel:    ++49-711-68565868
Allmandring 30a                Fax:    ++49-711-682357
70550 Stuttgart (Germany)      WWW:    http://www.tik.uni-stuttgart.de/



More information about the Python-list mailing list