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.

SentryMiddleware problem with Django 1.10: TypeError: Initialization arguments are not supported

See original GitHub issue

After 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mitsuhikocommented, Oct 18, 2016

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.

1reaction
mitsuhikocommented, Oct 18, 2016

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.

Read more comments on GitHub >

github_iconTop 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 >

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