2012-08-27 28 views
1
>Traceback (most recent call last): 
> File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run 
> self.finish_response() 
>Traceback (most recent call last): 
> File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response 
>Traceback (most recent call last): 
> File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run 
> File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run 
> self.finish_response() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response 
> self.write(data) 
> self.finish_response() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write 
> File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response 
> self.write(data) 
> File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write 
> self.send_headers() 
> self.write(data) 
> File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers 
>Traceback (most recent call last): 
> File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write 
> File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run 
> self.send_preamble() 
> self.send_headers() 
> self.finish_response() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers 
> File "C:\Python27\lib\wsgiref\handlers.py", line 127, in finish_response 
> self.send_preamble() 
> self.send_headers() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble 
>[27/Aug/2012 10:30:06] "GET /index/ HTTP/1.1" 200 6309 
> File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble 
> File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers 
> self.write(data) 
> File "C:\Python27\lib\wsgiref\handlers.py", line 210, in write 
> 'Date: %s\r\n' % format_date_time(time.time()) 
> 'Date: %s\r\n' % format_date_time(time.time()) 
> File "C:\Python27\lib\socket.py", line 324, in write 
> File "C:\Python27\lib\socket.py", line 324, in write 
> self.send_preamble() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble 
> self.send_headers() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 268, in send_headers 
> 'Date: %s\r\n' % format_date_time(time.time()) 
> File "C:\Python27\lib\socket.py", line 324, in write 
> self.send_preamble() 
> File "C:\Python27\lib\wsgiref\handlers.py", line 192, in send_preamble 
> self.flush() 
> self.flush() 
> self.flush() 
> File "C:\Python27\lib\socket.py", line 303, in flush 
> File "C:\Python27\lib\socket.py", line 303, in flush 
> File "C:\Python27\lib\socket.py", line 303, in flush 
> self._sock.sendall(view[write_offset:write_offset+buffer_size]) 
> 'Date: %s\r\n' % format_date_time(time.time()) 
> File "C:\Python27\lib\socket.py", line 324, in write 
> self._sock.sendall(view[write_offset:write_offset+buffer_size]) 
> self._sock.sendall(view[write_offset:write_offset+buffer_size]) 
>error: [Errno 10053] An established connection was aborted by the software in your host machine 
+0

我跑我的Django PROGRAME,有時,當我發送一個請求,PROGRAME下去,上面的回溯,這個問題困擾了我很多,誰知道是什麼回事? – user1626639

+0

你已經嘗試過,你可以取悅程序段是哪個程序ü運行了什麼嗎? – user1614526

回答

1

檢查urls.py文件。當我有這個問題上來,這是由於這行代碼的加粗部分:

url((r'^foo/(?P<thing1>[a-zA-Z0-9\-_]+),**(?P<thing2>%s**' % REGEX), 'views.foo'), 

注意缺少關閉括號中。這顯然引起了整個事情就會失控,隨地吐痰同一種錯誤,你來到這裏。因此,檢查缺少括號和壞的正則表達式語法 - 我敢打賭,那些人是你的問題的根源。