2010-07-07 2 views
2

Twisted Python HTTP 프록시를 작성하고 프록시를 통해 페이지로 이동 한 후 다음의 Traceback을 계속 가져옵니다.꼬인 웹 프록시 도움말!

Traceback (most recent call last): 
    File "C:\ZBrownTechnology\Web Lock\Proxy.py", line 57, in <module> 
    reactor.run() 
    File "C:\Python26\lib\site-packages\twisted\internet\base.py", line 1165, in run 
    self.mainLoop() 
    File "C:\Python26\lib\site-packages\twisted\internet\base.py", line 1177, in mainLoop 
    self.doIteration(t) 
    File "C:\Python26\lib\site-packages\twisted\internet\selectreactor.py", line 140, in doSelect 
    _logrun(selectable, _drdw, selectable, method, dict) 
--- <exception caught here> --- 
    File "C:\Python26\lib\site-packages\twisted\python\log.py", line 84, in callWithLogger 
return callWithContext({"system": lp}, func, *args, **kw) 
    File "C:\Python26\lib\site-packages\twisted\python\log.py", line 69, in callWithContext 
    return context.call({ILogContext: newCtx}, func, *args, **kw) 
    File "C:\Python26\lib\site-packages\twisted\python\context.py", line 59, in ca 
llWithContext 
    return self.currentContext().callWithContext(ctx, func, *args, **kw) 
    File "C:\Python26\lib\site-packages\twisted\python\context.py", line 37, in callWithContext 
    return func(*args,**kw) 
    File "C:\Python26\lib\site-packages\twisted\internet\selectreactor.py", line 156, in _doReadOrWrite 
    self._disconnectSelectable(selectable, why, method=="doRead") 
    File "C:\Python26\lib\site-packages\twisted\internet\posixbase.py", line 250, 
in _disconnectSelectable 
    selectable.readConnectionLost(f) 
    File "C:\Python26\lib\site-packages\twisted\internet\tcp.py", line 508, in readConnectionLost 
    self.connectionLost(reason) 
    File "C:\Python26\lib\site-packages\twisted\internet\tcp.py", line 677, in connectionLost 
    Connection.connectionLost(self, reason) 
    File "C:\Python26\lib\site-packages\twisted\internet\tcp.py", line 519, in connectionLost 
    protocol.connectionLost(reason) 
    File "C:\Python26\lib\site-packages\twisted\web\http.py", line 489, in connectionLost 
    self.handleResponseEnd() 
    File "C:\Python26\lib\site-packages\twisted\web\proxy.py", line 88, in handleResponseEnd 
    self.father.finish() 
    File "C:\Python26\lib\site-packages\twisted\web\http.py", line 900, in finish 
    "Request.finish called on a request after its connection was lost; " 
exceptions.RuntimeError: Request.finish called on a request after its connection 
was lost; use Request.notifyFinish to keep track of this. 

이것은 무엇을 의미합니까? 어떻게 수정해야합니까? 모듈 문제입니까 아니면 내 코드의 문제입니까? Windows XP에서 Python 2.6을 사용 중입니다.

답변

3

twisted.web.proxy의 known bug입니다. 그것은 일반적으로 무해합니다. 문제가 발생한 경우 문제 해결을위한 패치 제공을 고려하십시오!

+0

그리고 현재, 내가 침묵 할 수있는 방법이 없습니까? backgraound에서 실행하려면 프록시가 필요하지만 오류가 발생하면 프록시가 표시됩니다. 이제는이 오류를 표시하기 시작하면 프록시를 사용하는 사용자에게 브라우저 오류를 제공합니다. Internet Explorer에서 웹 페이지를 표시 할 수 없습니다. 이 부분이 버그의 일부입니까? 프록시를 작성하는 더 좋은 방법을 알고 있습니까? –

+0

누구든지이 버그에 대한 임시 패치를 내놓을 수있었습니다. 방금 오류가 발생한 모듈의 코드 줄을 주석 처리했습니다. 지금은 매력처럼 작동합니다! –

+0

그 버그를 수정하지 않습니다, 다른 하나를 소개합니다 :). 그러나 JP가 추적기에 링크 된 버그에 대한 토론을 계속하십시오. – Glyph