falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.5k stars 935 forks source link

More complex example crashes on any request #757

Closed dergigi closed 8 years ago

dergigi commented 8 years ago

I tried to get the more complex example working and encountered the following error on any request:

2016-04-16 18:23:44 +0200] [13566] [ERROR] Error handling request /
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/gunicorn/workers/sync.py", line 130, in handle
    self.handle_request(listener, req, client, addr)
  File "/Library/Python/2.7/site-packages/gunicorn/workers/sync.py", line 171, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/Library/Python/2.7/site-packages/falcon/api.py", line 167, in __call__
    self._call_req_mw(middleware_stack, req, resp)
  File "/Library/Python/2.7/site-packages/falcon/api.py", line 535, in _call_req_mw
    process_request(req, resp)
  File "/Users/gigi/Development/newspaper3k-api-using-falcon/more-complex-example.py", line 61, in process_request
    href='http://docs.example.com/auth')
TypeError: __init__() takes exactly 4 arguments (3 given)
kgriffs commented 8 years ago

I was able to reproduce the problem. The complex example was not updated to reflect changes since 0.3.