Giter VIP home page Giter VIP logo

Comments (2)

mouneyrac avatar mouneyrac commented on September 18, 2024

Some of my airnotifier log starting when I manually delete the token in the web interface (still could be related to the finish() called twice):

[I 120719 14:45:08 web:1393] 302 GET /applications/moodle/tokens?delete=5004f8c6358c81961efeefb6 (127.0.0.1) 2.15ms
[I 120719 14:45:08 web:1393] 200 GET /applications/moodle/tokens (127.0.0.1) 28.50ms
[I 120719 14:45:25 web:1393] 200 POST /tokens/016169f56ff32fc7a8a4061f459fb86ffad348dbb785c4805a891020da2e3cd1 (192.168.100.193) 1.47ms
[E 120719 14:45:25 web:1031] Uncaught exception POST /tokens/016169f56ff32fc7a8a4061f459fb86ffad348dbb785c4805a891020da2e3cd1 (192.168.100.193)
HTTPRequest(protocol='http', host='jerome.moodle.local:8801', method='POST', uri='/tokens/016169f56ff32fc7a8a4061f459fb86ffad348dbb785c4805a891020da2e3cd1', version='HTTP/1.1', remote_ip='192.168.100.193', body='', headers={'Content-Length': '0', 'X-An-App-Name': 'moodle', 'Accept-Language': 'en-us', 'Accept-Encoding': 'gzip, deflate', 'Host': 'jerome.moodle.local:8801', 'Accept': 'application/json', 'User-Agent': 'Moodle/20120524 CFNetwork/548.1.4 Darwin/11.0.0', 'Connection': 'keep-alive', 'X-An-App-Key': 'c9be48bcfb58f0af92d315c3d27dd180'})
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/web.py", line 988, in _execute
getattr(self, self.request.method.lower())(_args, *_kwargs)
File "/Users/jerome/Documents/airnotifier/apihandlers.py", line 172, in post
self.send_response(dict(error=str(ex)))
File "/Users/jerome/Documents/airnotifier/apihandlers.py", line 109, in send_response
self.finish(data)
File "/Users/jerome/Documents/airnotifier/apihandlers.py", line 112, in finish
super(APIBaseHandler, self).finish(chunk)
File "/Library/Python/2.7/site-packages/tornado-2.2.1-py2.7.egg/tornado/web.py", line 636, in finish
raise RuntimeError("finish() called twice. May be caused "
RuntimeError: finish() called twice. May be caused by using async operations without the @asynchronous decorator.
[E 120719 14:45:25 web:686] Cannot send error response after headers written
[I 120719 14:45:38 web:1393] 200 GET /applications/moodle/tokens (127.0.0.1) 26.65ms

from airnotifier.

dcai avatar dcai commented on September 18, 2024

I should be ok now, I added "return" statement after the send_response call.

from airnotifier.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.