-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Weird "Silk middleware has not been installed correctly" error #65
Comments
Hey buddy, huge apologies for late reply. I haven't actually used Silk with 1.5 for ages (I think it's deprecated now?) but I wouldn't expect it to break like this. Is this happening with |
1.5 is indeed deprecated, I use it for a non-public thing where there just hasn't been time to upgrade. Yes, through manage.py runserver. |
I get this error too using django-extensions (ForeignKeyAutocompleteAdmin) with django-silk |
Any solution of this issue? I am also facing this issue while working with django-channels (sockets). |
It seems running |
Is there any progress on it? I have this problem with django-channels |
Still experiencing this as well with channels. |
I am not using
The only middleware before the Silk middleware is from Gzip, as it should be according to this issue. |
Does someone know at which piece of code is causing this issue? let's try fix this.. |
Hi guy, Any update on the above issue, We are also facing it with a similar middleware configuration MIDDLEWARE_CLASSES = ( |
Came across the same issue. We had |
Hello, I'm encountering a weird problem with Silk.
First off: the silk middleware is at the top of my middleware stack (I've tried other positions as well) so nothing should be able to stop it from running. What happens though is that the first request issued when the server has started passes through fine. The second request gets stuck in the Silk middleware.
In line 94 of
middleware.py:process_request
, it throws a RuntimeError exception atI dug a little deeper and it appears as though what fails is
at lines 159–165 in
model_factory.py:construct_request_model
. I had this open in PDB, so I tried manually issuing the call tomodels.Request.objects.create
, and got the same result. It appears as though it happens at some point when theRequest
model issave()
d, but I haven't been able to figure out more accurately what happens there.This is the error that is eventually thrown by
save()
And it's worth noting that this does not happen the first request that is issued to the server, only all the ones after that!
I'm not sure how much of this is my fault, nor what I'm doing wrong if anything, but I figured it might be something you'd like to know about if it's an issue in Silk. This is with Django 1.5.9.
I'm don't know if this matters at all, but I noticed that configure() which creates the thread-local storage is called after the RequestModel is created. From what I can tell, the RuntimeError is issued when the thread-local storage is not yet created. On the other hand, configure must be called after the requestmodel is created because it takes it as a parameter.
The text was updated successfully, but these errors were encountered: