-
-
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
Silky doesn't work when django.middleware.gzip.GZipMiddleware is enabled #43
Comments
Edit your MIDDLEWARE_CLASSES so that GZipMiddleware is before SilkyMiddleware |
Issue 43: jazzband#43 SilkyMiddleWare should be listed before GZipMiddleware
As @brmc says, things can go awry with middleware placement. I thought I'd fixed the unicode issues however, so I'll leave this open for now and investigate further at some point |
The unicode issues arent really your fault. Python 2.x is just traditionally terrible with unicode. This same thing will happen with gzipmiddleware just about anytime other apps are analyzing or modifying the response. And FWIW, i like where this app is going. it picks up exactly where debug-toolbar leaves off. In the next couple weeks Im going to try and tackle your enhancement requests(no promises though in case i get busy with work). and i'll probably add some tox integration and python 3 support along the way. good work! |
That's a good point and thanks! If you get to the enhancements do let me know if have any questions about anything. Tox especially sounds like a good idea --Mike |
@mtford90 in regards to tox, i'll probably start by restructuring your test paths if that's ok with you. similar to, if not exactly like, what I did here: https://github.com/brmc/django-media-helper the main difference being that, rather than copying the directories during the tests, i'd create a test folder and then symlink to the project from within. |
Yeah that's fine with me, the proj organisation is a bit skewed anyhow. We should prob move this to a diff. issue btw ;) |
Closing this as can be solved by middleware placement. Let me know if you're still havin issues tho @melbic |
Issue 43: jazzband/django-silk#43 SilkyMiddleWare should be listed before GZipMiddleware
When the 'django.middleware.gzip.GZipMiddleware' is enabled the following error happens:
File "...r/lib/python2.7/site-packages/silk/sql.py", line 39, in execute_sql
sql_query = q % params
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)
The text was updated successfully, but these errors were encountered: