문제

APT (Python 2.5, SimpleJson 등)를 통해 필요한 패키지를 설치 한 후 데모를 실행하려고 할 때 오류가 발생합니다.


: Request instance has no attribute 'responseHeaders'
/usr/lib/python2.5/site-packages/tornado/web.py, line 404 in flush
402    for k,v in self._generate_headers():
403      if isinstance(v, list):
404        self.request.responseHeaders.setRawHeaders(k, v)
405      else:
Self
request 
twisted.web.server.Request instance @ 0x85da24c 
Locals
self    
k   'Set-Cookie'
v   
List instance @ 0x85da46c

다음은 필요한 패키지가 설치되어 있다는 증거입니다


/web/tmp/tornado/demos/helloworld# dpkg -l | grep python2.5
ii  python2.5                             2.5.2-2ubuntu6                                             An interactive high-level object-oriented la
ii  python2.5-dev                         2.5.2-2ubuntu6                                             Header files and a static library for Python
ii  python2.5-minimal                     2.5.2-2ubuntu6                                             A minimal subset of the Python language 
# dpkg -l | grep simplejson
ii  python-simplejson                     1.7.3-1  
# dpkg -l | grep pycurl
ii  python-pycurl                         7.16.4-1

너무 많은 사람들이 Friendfeed 에서이 토네이도를 시험해 본 적이없는 것 같습니다. 누구든지 내가 일어나고 달리는 데 도움이되는 제안/힌트가 있습니까?

도움이 되었습니까?

해결책

나는 토네이도가 뒤틀린 것에 의존하지 않는 인상 아래 있었다. "공식"버전을 사용해 보셨습니까? 404 행은 완전히 다릅니다.

http://github.com/facebook/tornado/blob/master/tornado/web.py

def flush(self, include_footers=False):
    """Flushes the current output buffer to the nextwork."""
    if self.application._wsgi:
        raise Exception("WSGI applications do not support flush()") #line 404
    if not self._headers_written:
        self._headers_written = True
        headers = self._generate_headers()
    else:
        headers = ""

그 외에는 Twisted를 설치하고 어떤 일이 일어나는지 볼 것입니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top