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 5974451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:56:43+00:00 2026-05-22T20:56:43+00:00

Locally I use sqllite3 as a database, but in production I use MySQL. When

  • 0

Locally I use sqllite3 as a database, but in production I use MySQL. When I moved my project to production I encountered this error:

  ...
File "S:\Python27\lib\site-packages\django\templatetags\i18n.py", line 46, in
render
    langs = self.languages.resolve(context)
  File "S:\Python27\lib\site-packages\django\template\base.py", line 653, in res
olve
    value = self._resolve_lookup(context)
  File "S:\Python27\lib\site-packages\django\template\base.py", line 692, in _re
solve_lookup
    raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bit, current
)) # missing attribute
VariableDoesNotExist: Failed lookup for key [LANGUAGES] in u'[{}, {}, {}]'

I’m using django’s i18n

Any ideas on where this is coming from? Google didn’t inform much, also what data would be useful to look at for debugging? I pointed my local test environment to the production DB and got the same error.

My LANGUAGES var in settings.py is:

LANGUAGES = (
    ('en',gettext('English')),
    ('fr',gettext('French')),
)

EDIT
With debug turned on I get the error:

Caught OperationalError while rendering: (1242, 'Subquery returns more than 1 row')

on the line {% for f in frames %}

My Frame model is:

@I18n('title','description')
class Collection(models.Model):
    title = models.CharField(max_length=255)
    description = models.CharField(max_length=255)
    order = models.IntegerField(default=100)
    image = models.ImageField(upload_to="collection/images",null=True)
    rollover = models.ImageField(upload_to="collection/images",null=True,blank=True)
    publish = models.BooleanField(default=True)

    def __unicode__(self):
        return self.title

@I18n('title')
class Frame(models.Model):
    title = models.CharField(max_length=255)
    collection = models.ManyToManyField(Collection)
    order = models.IntegerField(default=100)
    image = models.ImageField(upload_to="frame/images")
    rollover = models.ImageField(upload_to="frame/images",null=True,blank=True)
    publish = models.BooleanField(default=True)

    def __unicode__(self):
        return self.title

EDIT #2

The troublesome MySQL lines, that doesn’t fail in SQLite

SELECT `FrontEnd_article`.`id`, `FrontEnd_article`.`title_fr`, `FrontEnd_article`
.`title_en`, `FrontEnd_article`.`text_fr`, `FrontEnd_article`.`text_en`, 
`FrontEnd_article`.`date`, `FrontEnd_article`.`image`, `FrontEnd_article`.`image_text`, 
`FrontEnd_article`.`can_comment`, `FrontEnd_article`.`order`, 
`FrontEnd_article`.`publish` FROM `FrontEnd_article` INNER JOIN 
`FrontEnd_article_frames` ON (`FrontEnd_article`.`id` = 
`FrontEnd_article_frames`.`article_id`) WHERE `FrontEnd_article_frames`.`frame_id` =  
(SELECT U0.`id` FROM `FrontEnd_frame` U0 INNER JOIN `FrontEnd_frame_collection` U1 ON 
(U0.`id` = U1.`frame_id`) WHERE (U1.`collection_id` = 1  AND U0.`publish` = True )) 
ORDER BY `FrontEnd_article`.`date` DESC

Thanks again for the help!

  • 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-05-22T20:56:43+00:00Added an answer on May 22, 2026 at 8:56 pm

    Is the traceback the same if you enable DEBUG temporarily? Error messages can be misleading when it is disabled. It could as well be a wrong database setting and Django bails out at a different stage.

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

Sidebar

Related Questions

We use Subversion locally, and we're working on a project that uses a fork
I need to download an XML file, using HTTP protocol, to use it locally
I use ELMAH locally and I wanna to use it in the production environment.
I understand how to use PowerShell to install/uninstall locally, but how can I run
I installed the paperclip plugin and was able to use it locally. When I
I use python -m SimpleHTTPServer when I want to run my web application locally,
Locally deleting a file followed by svn update restores the local copy of that
Locally I need to code against Java 1.4. I tried the suggestion in this
When running the following locally, the fade in is very smooth, but on a
I'm using Mercurial locally for a project (it's the only repo there's no pushing/pulling

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.