- changed status to open
Postman with johnny-cache
I have this issue with johnny-cache middleware enabled:
Request URL: http://localhost:8000/messages/inbox/
Django Version: 1.5.5
Exception Type: TypeError
Exception Value:
unbound method execute_sql() must be called with SQLCompiler instance as first argument (got CompilerProxy instance instead)
Exception Location: /home/.../johnny/cache.py in newfun, line 352
In template /home/dev/projects/shavandin/templates/postman/base_folder.html, error at line 18
{% if invalid_page %}
16 <p>{% trans "Sorry, this page number is invalid." %}</p>
17 {% else %}
18 **{% if pm_messages %}**
19 {% block pm_by_modes %}<div id="pm_by_modes">
20 <span class="pm_by_mode">{% if by_message %}<a href="{{ by_conversation_url }}">{% endif %}{% trans "by conversation" %}{% if by_message %}</a>{% endif %}</span>
21 <span class="pm_by_mode">{% if by_conversation %}<a href="{{ by_message_url }}">{% endif %}{% trans "by message" %}{% if by_conversation %}</a>{% endif %}</span>
22 </div>{% endblock pm_by_modes %}
Comments (11)
-
repo owner -
Account Deactivated reporter python 2.7, django 1.5.5, johnny 1.4, postman 3.0.2, mysql, cache is johnny+memcached. Without caching everything works good.
Exception happens here https://github.com/jmoiron/johnny-cache/blob/master/johnny/cache.py#L352
johnny got CompilerProxy probably from here (line 95):
-
I can second this issue.. I've had to disable Johnny Cache because of it.
-
repo owner A comment to keep you informed.
The problem is located in the johnny-cache application, not in django-postman.
I developed a fix in the johnny code. Give me some more time to arrange it to be a clean patch and a candidate for a pull request.
-
Account Deactivated reporter It's great! Thank you!
-
That's really awesome, thanks for that matey
-
repo owner Please try my version available at https://github.com/psam44/johnny-cache and report the results.
-
repo owner What's up guys ? some results ?
-
Account Deactivated reporter Will try later today. Not enough time, sorry..
-
Account Deactivated reporter Please, ignore my previous message. Seems everything is ok, thank you.
-
repo owner - changed status to on hold
I submitted a pull request on upstream, with an updated version working on py2 or py3 and compliant with theirs backward compatibility conventions. https://github.com/jmoiron/johnny-cache/pull/68
Note: some Travis builds failed, but it's unrelated to my changes (seems to be an issue with memcache on py2).
- Log in to comment
Please give more context details. All versions : python, django, johnny-cache, postman, db, ... Any sub cache backends? What's your "line 352"? Your cache settings? Does it work with the cache disabled?