Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8100189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:40:50+00:00 2026-06-05T22:40:50+00:00

I can’t figure this out, and couldn’t find a solution after googling around. I’m

  • 0

I can’t figure this out, and couldn’t find a solution after googling around.
I’m implementing caching for my Django app.

The steps I took were:

  1. brew install libmemcache, which installed memcache as well

  2. pip install pylibmc

  3. pip install -e hg+https://jmoiron@bitbucket.org/jmoiron/johnny-cache, which installed without error.

  4. Added this to my settings.py

    CACHES = {
        'default': {
            'BACKEND': 'johnny.backends.memcached.PyLibMCCache',
            'LOCATION': ['127.0.0.1:11211'],
            'JOHNNY_CACHE': True,
        }
    }
    JOHNNY_MIDDLEWARE_KEY_PREFIX = 'product'
    
    MIDDLEWARE_CLASSES = (
        'johnny.middleware.LocalStoreClearMiddleware',
        'johnny.middleware.QueryCacheMiddleware',
        ...
    }
    

Now whenever I browse, in the console I can see things being stored in memcache, but as soon as a memcached get comes up, Caught TypeError while rendering: cannot concatenate 'str' and 'tuple' objects is thrown. Doesn’t matter what command is being run, and the error is in /env/pfenv/lib/python2.7/site-packages/django/db/backends/mysql/compiler.py in resolve_columns, line 12.

There is one other SO question about this, but the selected answer is to just use a different fork of the project, which hasn’t been updated and whose changes were actually merged into the master bucket almost right away. The pypi version (which I also tried) is from before the commit they claim broke things, and that one gives me the same error. This project is updated every two weeks or so and I’d like to get the benefit of other bugfixes they’ve released.

This should be pretty easy to implement, what am I doing wrong here?

Update

Submitted a bug report that also includes the stack trace, just in case this isn’t something that I’ve done.

Update 2

Actually went back and flushed the cache, turned off johnny-cache, and tried just the vanilla django cache settings with pylibmc. Doesn’t work, same error on every page. Tried it with python-memcache, same thing. Not sure what to look for here. Turning off caching completely, the site works just fine. Kinda need the caching though.

Update 3

Apparently this same source checked out by a coworker and installed the same way works. I have no idea what the difference is or what else to do to troubleshoot. Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:40:53+00:00Added an answer on June 5, 2026 at 10:40 pm

    This was never actually fixed on my machine, still not sure what the problem was. But it works as is on our deployment server and a coworker dev environment. I’m just going to leave the answer as there was something wrong with my setup, I’m assuming with the database, since I’ve had other random problems related to that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't figure out how to do this in a pretty way : I have
Can anyone help me trying to find out why this doesn't work. The brushes
Can't seem to figure out what's wrong with the simple getJSON call below. It's
Can't work out a way to make an array of buttons in android. This
Can anyone explain to me why this program: for(float i = -1; i <
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of
Can someone guide me on a possible solution? I don't want to use /bin/cp
can someone explain why the compiler accepts only this code template<typename L, size_t offset,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.