Ask Your Question
2

Django error: VariableDoesNotExist: Failed lookup for key [request] in u'[{}]'

asked Sep 22 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Oct 04 '11

Evgeny gravatar image Evgeny flag of Chile
6665 31 49 95
http://askbot.org/

Can anybody explain to me how to deal with the error as in the question title?

Comments

I will try to answer tomorrow, but basically - just like any other django app. Askbot does not require anything special (aside from the stuff in the docs). Please look up "how to install django app" on that host.

Evgeny (Sep 22 '11)

rephrased the question as it had nothing to do with the hosting provider.

Evgeny (Oct 04 '11)

8 Answers

Sort by » oldest newest most voted
1
Fabio has selected this answer as correct

answered Sep 29 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Oct 04 '11

Evgeny gravatar image Evgeny flag of Chile
6665 31 49 95
http://askbot.org/

This could be caused by several things:

  • models out of date - run python manage.py syncdb and python manage.py migrate
  • missing 'django.core.context_processors.request', in the TEMPLATE_CONTEXT_PROCESSORS
  • urlpatterns tuple is empty, urls.py - in the django project root.

Askbot provides a sample urls.py in the directory askbot/setup_templates, you can take it there, or run askbot-setup. askbot-setup will make a copy, but will not overwrite an existing file though.

link
0
Fabio has selected this answer as correct

answered Sep 25 '11

Fabio gravatar image Fabio flag of Italy
53 1 1 8
http://www.virtualb.it/

I have installed askbot on webfaction server as a reusable django application, but I have gott this error:

[Sun Sep 25 23:51:40 2011] [notice] Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1 configured -- resuming normal operations
[Sun Sep 25 16:51:44 2011] [error] /home/webapp/lib/python2.6/coffin/common.py:49: UserWarning: Cannot translate loader: askbot.skins.loaders.load_template_source
[Sun Sep 25 16:51:44 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1] mod_wsgi (pid=9004): Exception occurred processing WSGI script '/home/webapp/webapps/django/myproject.wsgi'.
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1] Traceback (most recent call last):
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/core/handlers/wsgi.py", line 272, in __call__
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     response = self.get_response(request)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/core/handlers/base.py", line 153, in get_response
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/core/handlers/base.py", line 218, in handle_uncaught_exception
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     return callback(request, **param_dict)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/utils/decorators.py", line 93, in _wrapped_view
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     response = view_func(request, *args, **kwargs)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/views/defaults.py", line 31, in server_error
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     return http.HttpResponseServerError(t.render(Context({})))
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 123, in render
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     return self._render(context)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 117, in _render
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     return self.nodelist.render(context)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 744, in render
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     bits.append(self.render_node(node, context))
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 757, in render_node
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     return node.render(context)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/askbot/templatetags/extra_tags.py", line 142, in render
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     request = self.request_var.resolve(context)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 653, in resolve
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     value = self._resolve_lookup(context)
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]   File "/home/webapp/lib/python2.6/django/template/base.py", line 692, in _resolve_lookup
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1]     raise VariableDoesNotExist("Failed lookup for key [%s] in %r", (bit, current)) # missing attribute
[Sun Sep 25 16:51:44 2011] [error] [client 127.0.0.1] VariableDoesNotExist: Failed lookup for key [request] in u'[{}]'

Django version is 1.3.1.

Fabio

link

Comments

Fabio, can you paste your settings.py somewhere (after deleting passwords). Did you use askbot-setup script? I think you might be missing something in the TEMPLATE_CONTEXT_PROCESSORS variable of the settings. The template of settings.py used by askbot is in askbot/setup_templates/settings.py.

Evgeny (Sep 25 '11)

The askbot-setup script creates settings.py in your project directory, based on the template, but if you already have a settings.py your file will not be updated automatically - in that case it will be necessary to add the changes to the settings file manually.

Evgeny (Sep 25 '11)

Hi Evgeny, I did as you tell, but I continue to have the same error.

Fabio (Sep 26 '11)

@Fabio, could you accept my answer as correct, otherwise this thread does not appear useful, I've just added two additional reasons why this might happen.

Evgeny (Oct 04 '11)
0
Fabio has selected this answer as correct

answered Sep 26 '11

Fabio gravatar image Fabio flag of Italy
53 1 1 8
http://www.virtualb.it/

This is my settings.py:

#!/usr/bin/env python26

# Django settings for myproject project.

#ASKBOT
import os.path
import logging
import sys
import askbot
import os

DEBUG = False
TEMPLATE_DEBUG = DEBUG

ADMINS = (
    # ('Your Name', 'your_email@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
        'NAME': '*************',                      # Or path to database file if using sqlite3.
        'USER': '*************',                      # Not used with sqlite3.
        'PASSWORD': '*************',                  # Not used with sqlite3.
        'HOST': '*************',                      # Set to empty string for localhost. Not used with sqlite3.
        'PORT': '',                      # Set to empty string for default. Not used with sqlite3.
    }
}


#ASKBOT
#outgoing mail server settings
SERVER_EMAIL = '************'
DEFAULT_FROM_EMAIL = '************'
EMAIL_HOST_USER = '************'
EMAIL_HOST_PASSWORD = ''
EMAIL_SUBJECT_PREFIX = ''
EMAIL_HOST=''
EMAIL_PORT=''
EMAIL_USE_TLS=False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

IMAP_HOST = ''
IMAP_HOST_USER = ''
IMAP_HOST_PASSWORD = ''
IMAP_PORT = ''
IMAP_USE_TLS = False



# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# On Unix systems, a value of None will cause Django to use the same
# timezone as the operating system.
# If running in a Windows environment this must be set to the same as your
# system time zone.
TIME_ZONE = 'America/Chicago'

# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE = 'en'

SITE_ID = 1

# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True

# If you set this to False, Django will not format dates, numbers and
# calendars according to the current locale
USE_L10N = True

# Absolute filesystem path to the directory that will hold user-uploaded files.
# Example: "/home/media/media.lawrence.com/media/"
MEDIA_ROOT = '/home/webapp/webapps/media/'

# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash.
# Examples: "http://media.lawrence.com/media/", "http://example.com/media/"
MEDIA_URL = 'http://webapp.webfactional.com/media/'

# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
STATIC_ROOT = ''

# URL prefix for static files.
# Example: "http://media.lawrence.com/static/"
STATIC_URL = '/static/'

# URL prefix for admin static files -- CSS, JavaScript and images.
# Make sure to use a trailing slash.
# Examples: "http://foo.com/static/admin/", "/static/admin/".
ADMIN_MEDIA_PREFIX = 'http://webapp.webfactional.com/media/admin/'


#ASKBOT
#this line is added so that we can import pre-packaged askbot dependencies
sys.path.append(os.path.join(os.path.dirname(askbot.__file__), 'deps'))

PROJECT_ROOT = os.path.join(os.path.dirname(__file__), 'forum')
ASKBOT_FILE_UPLOAD_DIR = os.path.join(os.path.dirname(__file__), 'forum', 'askbot', 'upfiles')


# Additional locations of static files
STATICFILES_DIRS = (
    # Put strings here, like "/home/html/static" or "C:/www/django/static".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
)

# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
    'django.contrib.staticfiles.finders.FileSystemFinder',
    'django.contrib.staticfiles.finders.AppDirectoriesFinder',
    'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = '==#f0y-7^7@jn$5&2t6p4ep-5!340h^k5117ldeqr_61s_g0*z'

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
    'django.template.loaders.filesystem.Loader',
    'django.template.loaders.app_directories.Loader',
    #'django.template.loaders.eggs.Loader',

    #below is askbot stuff for this tuple
    'askbot.skins.loaders.load_template_source',
)

MIDDLEWARE_CLASSES = (
    'django.contrib.sessions.middleware.SessionMiddleware',
    'django.middleware.csrf.CsrfViewMiddleware',
    'django.middleware.common.CommonMiddleware',
    'django.contrib.auth.middleware.AuthenticationMiddleware',
    'django.contrib.messages.middleware.MessageMiddleware',

    'askbot.middleware.anon_user.ConnectToSessionMessagesMiddleware',
    'askbot.middleware.pagesize.QuestionsPageSizeMiddleware',
    'askbot.middleware.cancel.CancelActionMiddleware',
    'django.middleware.transaction.TransactionMiddleware',
    'askbot.middleware.view_log.ViewLogMiddleware',
    'askbot.middleware.spaceless.SpacelessMiddleware',

)

ROOT_URLCONF = 'myproject.urls'


#UPLOAD SETTINGS
FILE_UPLOAD_TEMP_DIR = os.path.join(
                                os.path.dirname(__file__), 
                                'tmp'
                            ).replace('\\','/')

FILE_UPLOAD_HANDLERS = (
    'django.core.files.uploadhandler.MemoryFileUploadHandler',
    'django.core.files.uploadhandler.TemporaryFileUploadHandler',
)
ASKBOT_ALLOWED_UPLOAD_FILE_TYPES = ('.jpg', '.jpeg', '.gif', '.bmp', '.png', '.tiff')
ASKBOT_MAX_UPLOAD_FILE_SIZE = 1024 * 1024 #result in bytes
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'


TEMPLATE_DIRS = (
    # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
    # Always use forward slashes, even on Windows.
    # Don't forget to use absolute paths, not relative paths.
    '/home/webapp/webapps/django/myproject/templates/'

)


TEMPLATE_CONTEXT_PROCESSORS = (
    'django.core.context_processors.request',
    'askbot.context.application_settings',
    'django.core.context_processors.i18n',
    'askbot.user_messages.context_processors.user_messages',#must be before auth
    'django.core.context_processors.auth', #this is required for admin
    'django.core.context_processors.csrf', #necessary for csrf protection
)

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'django.contrib.admindocs',

    # Askbot
    'askbot',
    'askbot.deps.django_authopenid',
    #'askbot.importers.stackexchange', #se loader
    'south',
    'askbot.deps.livesettings',
    'keyedcache',
    'robots',
    'django_countries',
    'djcelery',
    'djkombu',
    'followit',#pls look here http://askbot.org/doc/optional-modules.html#follow-users    
)


#ASKBOT
#setup memcached for production use!
#see http://docs.djangoproject.com/en/1.1/topics/cache/ for details
CACHE_BACKEND = 'locmem://'
#needed for django-keyedcache
CACHE_TIMEOUT = 6000
CACHE_PREFIX = 'askbot' #make this unique
#If you use memcache you may want to uncomment the following line to enable memcached based sessions
#SESSION_ENGINE = 'django.contrib.sessions.backends.cache_db'

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',
    'askbot.deps.django_authopenid.backends.AuthBackend',
)


#logging settings
LOG_FILENAME = 'askbot.log'
logging.basicConfig(
    filename=os.path.join(os.path.dirname(__file__), 'forum', 'log', LOG_FILENAME),
    level=logging.CRITICAL,
    format='%(pathname)s TIME: %(asctime)s MSG: %(filename)s:%(funcName)s:%(lineno)d %(message)s',
)

###########################
#
#   this will allow running your forum with url like http://site.com/forum
#
#   ASKBOT_URL = 'forum/'
#
ASKBOT_URL = 'forum/' #no leading slash, default = '' empty string
_ = lambda v:v #fake translation function for the login url
LOGIN_URL = '/%s%s%s' % (ASKBOT_URL,_('account/'),_('signin/'))
#note - it is important that upload dir url is NOT translated!!!
#also, this url must not have the leading slash
ASKBOT_UPLOADED_FILES_URL = '%s%s' % (ASKBOT_URL, 'upfiles/')
ALLOW_UNICODE_SLUGS = False

#Celery Settings
BROKER_BACKEND = "djkombu.transport.DatabaseTransport"
CELERY_ALWAYS_EAGER = True

import djcelery
djcelery.setup_loader()

CSRF_COOKIE_NAME = 'askbot_scrf'
CSRF_COOKIE_DOMAIN = ''#enter domain name here - e.g. example.com


# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.


# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
    'version': 1,
    'disable_existing_loggers': False,
    'handlers': {
        'mail_admins': {
            'level': 'ERROR',
            'class': 'django.utils.log.AdminEmailHandler'
        }
    },
    'loggers': {
        'django.request': {
            'handlers': ['mail_admins'],
            'level': 'ERROR',
            'propagate': True,
        },
    }
}
link

Comments

Fabio, I took these settings and was able to make the forum work. What do you do to make it fail - access some specific url?

Evgeny (Sep 26 '11)

Hi Evgeny, I simply try to access to root url or to /admin location.

Fabio (Sep 26 '11)

Can't reproduce. Can you email me a zipped version of your project directory? My email is evgeny.fadeev@gmail.com. Is settings.py the only difference from stock askbot in your project?

Evgeny (Sep 26 '11)

It is possible that there is some bug, but in this case to figure this out I need to see entire project. One thing I notice in your settings - CSRF_COOKIE_DOMAIN is not set, but it is unlikely to be the source of this particular error.

Evgeny (Sep 26 '11)

@Evgeny I think that @Fabio have a wrong setting configuration in TEMPLATE_DIR.

Fitoria (Sep 26 '11)
0
Fabio has selected this answer as correct

answered Sep 27 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Sep 27 '11

Fabio gravatar image Fabio flag of Italy
53 1 1 8
http://www.virtualb.it/

Hi Fitoria, I check the path of TEMPLATE_DIR, but it seems correct.

Maybe this log can help you to find the solution:

[Tue Sep 27 16:02:36 2011] [error] /home/webapp/lib/python2.6/coffin/common.py:49: UserWarning: Cannot translate loader: askbot.skins.loaders.load_template_source
[Tue Sep 27 16:02:36 2011] [error]   warnings.warn('Cannot translate loader: %s' % loader)
[Tue Sep 27 16:02:36 2011] [error] <WSGIRequest
[Tue Sep 27 16:02:36 2011] [error] GET:<QueryDict: {}>,
[Tue Sep 27 16:02:36 2011] [error] POST:<QueryDict: {}>,
[Tue Sep 27 16:02:36 2011] [error] COOKIES:{'sessionid': 'ac06b15de9368da994923c9202971198'},
[Tue Sep 27 16:02:36 2011] [error] META:{'DOCUMENT_ROOT': '/usr/local/apache2/htdocs',
[Tue Sep 27 16:02:36 2011] [error]  'GATEWAY_INTERFACE': 'CGI/1.1',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_ACCEPT': '*/*',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_ACCEPT_ENCODING': 'gzip,deflate,sdch',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_ACCEPT_LANGUAGE': 'it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_CONNECTION': 'close',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_COOKIE': 'sessionid=ac06b15de9368da994923c9202971198',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_HOST': 'webapp.webfactional.com',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_X_FORWARDED_FOR': '2.225.106.8',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_X_FORWARDED_HOST': 'webapp.webfactional.com',
[Tue Sep 27 16:02:36 2011] [error]  'HTTP_X_FORWARDED_SERVER': 'webapp.webfactional.com',
[Tue Sep 27 16:02:36 2011] [error]  'PATH_INFO': u'/favicon.ico',
[Tue Sep 27 16:02:36 2011] [error]  'PATH_TRANSLATED': '/home/webapp/webapps/django/myproject.wsgi/favicon.ico',
[Tue Sep 27 16:02:36 2011] [error]  'QUERY_STRING': '',
[Tue Sep 27 16:02:36 2011] [error]  'REMOTE_ADDR': '127.0.0.1',
[Tue Sep 27 16:02:36 2011] [error]  'REMOTE_PORT': '46926',
[Tue Sep 27 16:02:36 2011] [error]  'REQUEST_METHOD': 'GET',
[Tue Sep 27 16:02:36 2011] [error]  'REQUEST_URI': '/favicon.ico',
[Tue Sep 27 16:02:36 2011] [error]  'SCRIPT_FILENAME': '/home/webapp/webapps/django/myproject.wsgi',
[Tue Sep 27 16:02:36 2011] [error]  'SCRIPT_NAME': u'',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_ADDR': '127.0.0.1',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_ADMIN': '[no address given]',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_NAME': 'webapp.webfactional.com',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_PORT': '80',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_PROTOCOL': 'HTTP/1.0',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_SIGNATURE': '',
[Tue Sep 27 16:02:36 2011] [error]  'SERVER_SOFTWARE': 'Apache/2.2.17 (Unix) mod_wsgi/3.3 Python/2.7.1',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.application_group': 'web223.webfaction.com|',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.callable_object': 'application',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.handler_script': '',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.input_chunked': '0',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.listener_host': '',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.listener_port': '27193',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.process_group': 'django',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.request_handler': 'wsgi-script',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.script_reloading': '1',
[Tue Sep 27 16:02:36 2011] [error]  'mod_wsgi.version': (3, 3),
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.errors': <mod_wsgi.Log object at 0xaf08d0e8>,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xaf0814a0>,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.input': <mod_wsgi.Input object at 0xaf08d020>,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.multiprocess': True,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.multithread': True,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.run_once': False,
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.url_scheme': 'http',
[Tue Sep 27 16:02:36 2011] [error]  'wsgi.version': (1, 1)}>

Thank you for you attention,

Fabio

link
0
Fabio has selected this answer as correct

answered Oct 01 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Oct 01 '11

alvinsj gravatar image alvinsj
1 1

the urls.py is there, but the error still exists. I am using the source from github to deploy on a ubuntu server.

link

Comments

I saw this error when urls.py file was there but did not have all the urls for askbot defined. Also it is possible that root url conf setting in your settings.py. Compare your urls.py with askbot/setup_templates/urls.py.

Evgeny (Oct 01 '11)

i used askbot-setup for the project, and urls.py remains the same, root url conf is here> ROOT_URLCONF = os.path.basename(os.path.dirname(file)) + '.urls'

alvinsj (Oct 02 '11)

ROOT_URLCONF = os.path.basename(os.path.dirname(file)) + '.urls'

alvinsj (Oct 02 '11)

Could you send me your settings.py? Did you modify other files?

Evgeny (Oct 04 '11)

@alvinsj - I've updated my answer - hope it helps you.

Evgeny (Oct 04 '11)
see 3 more comments
0
Fabio has selected this answer as correct

answered Oct 13 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Oct 13 '11

Fabio gravatar image Fabio flag of Italy
53 1 1 8
http://www.virtualb.it/

Yes, I solved my problem :-) Thanks to Evgeny.

link
0
Fabio has selected this answer as correct

answered Dec 05 '11

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Dec 05 '11

jmarmolejos gravatar image jmarmolejos
1

How was this issue solved? I'm having the exact same issue here.

link

Comments

In my case I skipped past the super user creation step and apparently askbot doesn't like this.

jmarmolejos (Dec 05 '11)

Nope, it is not a problem normally. How did you create the settings.py and urls.py files for your project?

Evgeny (Dec 05 '11)

I had the same problem here, it "went away" mysteriously.

brycenesbitt (Jan 25)
0
Fabio has selected this answer as correct

answered Apr 10

this post is marked as community wiki

This post is a wiki. Anyone with karma >100 is welcome to improve it.

updated Apr 10

alexandros.z gravatar image alexandros.z
373 5 22

Hello. I am having the exact same problem and I dont understand what is the solution.

@Evgeny Regarding your proposals: I have run syncdb, migrate and I got all my configurations from askbot/setup_templates.

Something that may help more is that I have the exact same configuration files (except the name of the database and password) both in my local environment and in my server. In my local environment I dont have any problems. Problem appears only in the other environment.

I dont know if also helps but I also skipped the step about setting up a super user. I know that you already said that this should not affect but I want to add this info also. I followed all the steps that my provider suggested me about setting up a django application (actually it was a matter of few clicks, everything set up automatically). By the way, these are the versions I use Django 1.3.1 (mod_wsgi 3.2/Python 2.6)

Thanx in advance

link

Comments

Did migrate command work for you? Which database are you using?

Evgeny (Apr 10)

Postresql 9.1.0. About migrate command, your suspicions may be right. I am having these logs:

python2.6/django/db/__init__.py:19: DeprecationWarning: settings.DATABASE_* is deprecated; use settings.DATABASES instead. DeprecationWarning python2.6/django/db/__init__.py:60: DeprecationWarning: Short names for ENGINE in database configurations are deprecated. Prepend default.ENGINE with 'django.db.backends.' DeprecationWarning Running migrations for django_authopenid: - Nothing to migrate - Loading initial data for django_authopenid. No fixtures found. Running migrations for askbo

alexandros.z (Apr 10)
1

Askbot migrations have issues with Postgres 9.1, please see solution here http://askbot.org/en/question/7029/finally-got-askbot-working-on-webfactional and the link within (more importantly). Don't forget to set up full text search with the command, mentioned in the webfactional support forum.

Evgeny (Apr 10)

Thanx. I will read the instructions. If problem is fixed, I will let you know. Thanx again

alexandros.z (Apr 11)

migrate command didn't work for me i'm using mysql

megabosx (Apr 26)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Follow

subscribe to rss feed

Stats

Asked: Sep 22 '11

Seen: 717 times

Last updated: Apr 10