question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: __call__() missing 1 required positional argument: 'start_response'

See original GitHub issue

Hello. I have a similar problem like here.

My development environment is working fine. Python 3.8, Win 10 Django 3.0.2, Gunicorn Version 20.0.4, Uvicorn Version: 0.11.1: uvicorn config.asgi:application

But on production environment I use docker. Docker image: python:3.8-alpine Django 3.0.2, Gunicorn Version 20.0.4, Uvicorn Version: 0.11.1 CMD ["gunicorn", "-b", "0.0.0.0:8010", "--workers", "5", "-k", "uvicorn.workers.UvicornWorker", "config.asgi:application"] The application starts, but when you request any page, the server gives 500:

gate | [2020-01-13 13:47:51 +0000] [9] [ERROR] Exception in ASGI application gate | Traceback (most recent call last): gate | File “/usr/local/lib/python3.8/site-packages/uvicorn/protocols/http/httptools_impl.py”, line 385, in run_asgi gate | result = await app(self.scope, self.receive, self.send) gate | File “/usr/local/lib/python3.8/site-packages/uvicorn/middleware/proxy_headers.py”, line 45, in call gate | return await self.app(scope, receive, send) gate | File “/usr/local/lib/python3.8/site-packages/uvicorn/middleware/asgi2.py”, line 6, in call gate | instance = self.app(scope) gate | TypeError: call() missing 1 required positional argument: ‘start_response’

I tried to dig deeper, but it’s hard for me.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
tau-lexcommented, Jun 9, 2021

@ayois, No, I just changed the image. IMHO, the fact is that Alpine Images come with another implementation of the standard LIBC library - MUSL, and it is likely that it leads to some implicit behavior in Python modules, including Uvloop.

I also noticed problems with the launch of this environment on Python3.9. The choice of the docker image of Python3.8 or Python3.7 based on the debian will be more reliable.

1reaction
ayoisiocommented, Jun 13, 2021

I updated the base image to python:3.8-slim-buster and python:3.9-slim-buster and ran into the same error. I took a closer inspection afterwards to debug, and it turns out the issue was the WhiteNoise wrapper I used on the application in the asgi.py file. The issue is now resolved. Thanks for the help pinpointing the issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

call() missing 1 required positional argument #46090 - GitHub
As the title, when I try to export a multi-input model, it failed with an error message "call() missing 1 required positional argument:...
Read more >
call() missing 1 required positional argument: 'state_c' - Stack ...
I am trying to implement decoder function with attention and I am getting error saying: TypeError: call() missing 1 required positional ...
Read more >
copy() missing 1 required positional argument 'dst' - You.com
TypeError : copyfile() missing 1 required positional argument: 'dst' Why is copyfile not detecting the dst? How can I solve this? python; copy;...
Read more >
TypeError: __call__() missing 1 required positional argument
Hi @dusty_nv , With reference to the mentioned topic here, we are trying to create PyTorch test script for doing inference.
Read more >
Python missing 1 required positional argument: 'self' Solution
When you call a class method without first instantiating an object of that class, you get an error. This is because “self” has...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found