SentryMiddleware problem with Django 1.10: TypeError: Initialization arguments are not supported
See original GitHub issueAfter updating from 5.27.1
to 5.28.0
, I get the error:
File ".../wsgi.py", line 10, in <module>
application = get_wsgi_application()
File ".../venv/lib/python3.5/site-packages/django/core/wsgi.py", line 14, in get_wsgi_application
return WSGIHandler()
File ".../venv/lib/python3.5/site-packages/django/core/handlers/wsgi.py", line 153, in __init__
self.load_middleware()
File ".../venv/lib/python3.5/site-packages/django/core/handlers/base.py", line 84, in load_middleware
mw_instance = middleware(handler)
File ".../venv/lib/python3.5/site-packages/gevent/local.py", line 242, in __new__
raise TypeError("Initialization arguments are not supported")
TypeError: Initialization arguments are not supported
The error is raised in loading raven.contrib.django.middleware.SentryMiddleware
. It seems related to the new change to fix Django 1.10 middleware warning.
Hopefully I’ll check to provide a patch. I’m using Django==1.10.2
using the older style MIDDLEWARE = []
settings, if that is related.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Initialization arguments are not supported error django celery ...
When a user model is created / updated the following error appears from celery. Problem installing fixture '/believein/data/www/platform/ ...
Read more >TypeError: __init__() takes 1 positional argument but 2 were ...
4 installation, but I'm getting an error "TypeError: init() takes 1 positional argument but 2 were given" and can't figure out what's causing...
Read more >Middleware - Django documentation
Django initializes your middleware with only the get_response argument, so you can't define __init__() as requiring any other arguments.
Read more >sentry Changelog - PyUp.io
- Added first pass API at storing javascript artifacts via release APIs. - Improved error reporting for JavaScript source/sourcemap errors. - Improved ...
Read more >Flask got an unexpected keyword argument path
cdk synth hello-cdk-1 Jun 05, 2019 · TypeError: __init__ () got an unexpected keyword argument 'strict'. This is similar to but not the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi. I believe this was caused by an earlier commit that was pulled in. I pushed out 5.29.0 which I believe fixes this. My understanding is that this was isolated to uses of gevent with monkeypatching enabled.
I’m sorry for the instability @amiraliakbari. There is so much stuff in the library at this point and so much surface and different versions it tries to cover 😦
Going to look into this.