Zappa: TypeError: 'NoneType' object is not callable\n

I have tried to use Zappa 2 times from 2 different Django apps to 2 different AWS accounts and I get the exact same result both times. The deployment seems to work and I get this

100%|#########################################| 64/64 [02:15<00:00,  4.53s/res]
Deploying API Gateway..
Deployment complete!: https://kl5capzddj.execute-api.us-east-1.amazonaws.com/dev

Then I click on the link and I get this … which I have no clue how to fix… Also nothing goes into the s3 bucket. { “message”: “An uncaught exception happened while servicing this request.”, “traceback”: [ “Traceback (most recent call last):\n”, " File "/var/task/handler.py", line 395, in handler\n response = Response.from_app(self.wsgi_app, environ)\n", " File "c:\users\winuser\appdata\local\temp\pip-build-k_tf7n\Werkzeug\werkzeug\wrappers.py", line 865, in from_app\n", " File "c:\users\winuser\appdata\local\temp\pip-build-k_tf7n\Werkzeug\werkzeug\test.py", line 871, in run_wsgi_app\n", “TypeError: ‘NoneType’ object is not callable\n” ] }

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 6
  • Comments: 18 (2 by maintainers)

Most upvoted comments

Did you find a solution yet? I am getting the same error (without django).

My zappa_settings.json:

{
    "dev": {
        "aws_region": "us-east-1",
        "app_function": "my_app.app",
        "s3_bucket": "myproject-lambda",
        "profile_name": "myproject"
    }
}

When I remove everything but a hello world from the python file it works fine and the response is returned. If I import a module that was not installed via pip into the module that contains the WSGI application I get the same error message. The same WSGI application runs fine with uWSGI or gunicorn. Any ideas how to fix this?

Pushed Hotfix @flux627

I haven’t played with the django integration yet but I expect the .py is being used as a file name. Try taking that off so zappa can import your settings using that as the import path and see if that helps.