| <type 'exceptions.ImportError'> | Python 2.6.2: /usr/local/bin/python Mon Feb 8 22:10:17 2010 |
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
| /home/users/kaarstad/www/CMS/build/bdist.freebsd-7.1-RELEASE-p6-amd64/egg/flup/server/fcgi_base.py in run(self=<flup.server.fcgi_base.Request object at 0x802c50350>) |
| 556 """Runs the handler, flushes the streams, and ends the request.""" |
| 557 try: |
| 558 protocolStatus, appStatus = self.server.handler(self) |
| 559 except: |
| 560 traceback.print_exc(file=self.stderr) |
| /home/users/kaarstad/www/CMS/build/bdist.freebsd-7.1-RELEASE-p6-amd64/egg/flup/server/fcgi_base.py in handler(self=<flup.server.fcgi.WSGIServer object at 0x802c2c790>, req=<flup.server.fcgi_base.Request object at 0x802c50350>) |
| 1116 try: |
| 1117 try: |
| 1118 result = self.application(environ, start_response) |
| 1119 try: |
| 1120 for data in result: |
| /usr/local/lib/python2.6/site-packages/django/core/handlers/wsgi.py in __call__(self=<django.core.handlers.wsgi.WSGIHandler object at 0x802c2c810>, environ={'DOCUMENT_ROOT': '/home/users/kaarstad/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'no-cache', 'HTTP_CONNECTION': 'close', 'HTTP_HOST': 'www.kaarstad-media.no', 'HTTP_PRAGMA': 'no-cache', ...}, start_response=<function start_response at 0x802c33488>) |
| 239 response = http.HttpResponseBadRequest() |
| 240 else: |
| 241 response = self.get_response(request) |
| 242 |
| 243 # Apply response middleware |
| response undefined, self = <django.core.handlers.wsgi.WSGIHandler object at 0x802c2c810>, self.get_response = <bound method WSGIHandler.get_response of <djang...handlers.wsgi.WSGIHandler object at 0x802c2c810>>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}> |
| /usr/local/lib/python2.6/site-packages/django/core/handlers/base.py in get_response(self=<django.core.handlers.wsgi.WSGIHandler object at 0x802c2c810>, request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>) |
| 71 # Apply request middleware |
| 72 for middleware_method in self._request_middleware: |
| 73 response = middleware_method(request) |
| 74 if response: |
| 75 return response |
| response undefined, middleware_method = <bound method CommonMiddleware.process_request o...e.common.CommonMiddleware object at 0x802c50cd0>>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}> |
| /usr/local/lib/python2.6/site-packages/django/middleware/common.py in process_request(self=<django.middleware.common.CommonMiddleware object at 0x802c50cd0>, request=<WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>) |
| 54 # trailing slash and there is no pattern for the current path |
| 55 if settings.APPEND_SLASH and (not old_url[1].endswith('/')): |
| 56 if (not _is_valid_path(request.path_info) and |
| 57 _is_valid_path("%s/" % request.path_info)): |
| 58 new_url[1] = new_url[1] + '/' |
| global _is_valid_path = <function _is_valid_path at 0x803808e60>, request = <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDic...gi.url_scheme': 'http', 'wsgi.version': (1, 0)}>, request.path_info = u'/robots.txt' |
| /usr/local/lib/python2.6/site-packages/django/middleware/common.py in _is_valid_path(path=u'/robots.txt') |
| 140 """ |
| 141 try: |
| 142 urlresolvers.resolve(path) |
| 143 return True |
| 144 except urlresolvers.Resolver404: |
| global urlresolvers = <module 'django.core.urlresolvers' from '/usr/lo...n2.6/site-packages/django/core/urlresolvers.pyc'>, urlresolvers.resolve = <function resolve at 0x802c31320>, path = u'/robots.txt' |
| /usr/local/lib/python2.6/site-packages/django/core/urlresolvers.py in resolve(path=u'/robots.txt', urlconf=None) |
| 301 |
| 302 def resolve(path, urlconf=None): |
| 303 return get_resolver(urlconf).resolve(path) |
| 304 |
| 305 def reverse(viewname, urlconf=None, args=None, kwargs=None, prefix=None, current_app=None): |
| global get_resolver = <function get_resolver at 0x802c27b90>, urlconf = None, ).resolve undefined, path = u'/robots.txt' |
| /usr/local/lib/python2.6/site-packages/django/core/urlresolvers.py in resolve(self=<RegexURLResolver CMS.urls (None:None) ^/>, path=u'/robots.txt') |
| 214 if match: |
| 215 new_path = path[match.end():] |
| 216 for pattern in self.url_patterns: |
| 217 try: |
| 218 sub_match = pattern.resolve(new_path) |
| pattern undefined, self = <RegexURLResolver CMS.urls (None:None) ^/>, self.url_patterns = [<RegexURLResolver CMS.foo.urls (None:None) ^CMS/>, <RegexURLPattern None ^admin/(.*)>, <RegexURLResolver grappelli.urls (None:None) ^grappelli/>] |
| /usr/local/lib/python2.6/site-packages/django/core/urlresolvers.py in _get_url_patterns(self=<RegexURLResolver CMS.urls (None:None) ^/>) |
| 243 |
| 244 def _get_url_patterns(self): |
| 245 patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) |
| 246 try: |
| 247 iter(patterns) |
| patterns undefined, builtin getattr = <built-in function getattr>, self = <RegexURLResolver CMS.urls (None:None) ^/>, self.urlconf_module = <module 'CMS.urls' from '/home/users/kaarstad/www/CMS/urls.pyc'> |
| /usr/local/lib/python2.6/site-packages/django/core/urlresolvers.py in _get_urlconf_module(self=<RegexURLResolver CMS.urls (None:None) ^/>) |
| 238 return self._urlconf_module |
| 239 except AttributeError: |
| 240 self._urlconf_module = import_module(self.urlconf_name) |
| 241 return self._urlconf_module |
| 242 urlconf_module = property(_get_urlconf_module) |
| self = <RegexURLResolver CMS.urls (None:None) ^/>, self._urlconf_module = <module 'CMS.urls' from '/home/users/kaarstad/www/CMS/urls.pyc'>, global import_module = <function import_module at 0x8025b4f50>, self.urlconf_name = 'CMS.urls' |
| /usr/local/lib/python2.6/site-packages/django/utils/importlib.py in import_module(name='CMS.urls', package=None) |
| 32 break |
| 33 level += 1 |
| 34 name = _resolve_name(name[level:], package, level) |
| 35 __import__(name) |
| 36 return sys.modules[name] |
| builtin __import__ = <built-in function __import__>, name = 'CMS.urls' |
| /home/users/kaarstad/www/CMS/urls.py in |
| 3 # Uncomment the next two lines to enable the admin: |
| 4 from django.contrib import admin |
| 5 admin.autodiscover() |
| 6 |
| 7 urlpatterns = patterns('', |
| admin = None, admin.autodiscover undefined |
| /usr/local/lib/python2.6/site-packages/django/contrib/admin/__init__.py in autodiscover() |
| 54 # Step 3: import the app's admin file. If this has errors we want them |
| 55 # to bubble up. |
| 56 import_module("%s.admin" % app) |
| 57 # autodiscover was successful, reset loading flag. |
| 58 LOADING = False |
| global import_module = <function import_module at 0x8025b4f50>, app = 'django.contrib.auth' |
| /usr/local/lib/python2.6/site-packages/django/utils/importlib.py in import_module(name='django.contrib.auth.admin', package=None) |
| 32 break |
| 33 level += 1 |
| 34 name = _resolve_name(name[level:], package, level) |
| 35 __import__(name) |
| 36 return sys.modules[name] |
| builtin __import__ = <built-in function __import__>, name = 'django.contrib.auth.admin' |
| /usr/local/lib/python2.6/site-packages/django/contrib/auth/admin.py in |
| 2 from django.conf import settings |
| 3 from django.contrib import admin |
| 4 from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AdminPasswordChangeForm |
| 5 from django.contrib.auth.models import User, Group |
| 6 from django.core.exceptions import PermissionDenied |
| django undefined, UserCreationForm undefined, UserChangeForm undefined, AdminPasswordChangeForm undefined |
| /usr/local/lib/python2.6/site-packages/django/contrib/auth/forms.py in |
| 8 from django.utils.http import int_to_base36 |
| 9 |
| 10 class UserCreationForm(forms.ModelForm): |
| 11 """ |
| 12 A form that creates a user, with no privileges, from the given username and password. |
| UserCreationForm undefined, forms = None, forms.ModelForm undefined |
| /usr/local/lib/python2.6/site-packages/django/contrib/auth/forms.py in UserCreationForm() |
| 14 username = forms.RegexField(label=_("Username"), max_length=30, regex=r'^\w+$', |
| 15 help_text = _("Required. 30 characters or fewer. Alphanumeric characters only (letters, digits and underscores)."), |
| 16 error_message = _("This value must contain only letters, numbers and underscores.")) |
| 17 password1 = forms.CharField(label=_("Password"), widget=forms.PasswordInput) |
| 18 password2 = forms.CharField(label=_("Password confirmation"), widget=forms.PasswordInput) |
| error_message undefined, global _ = None |
| /usr/local/lib/python2.6/site-packages/django/forms/fields.py in __init__(self=<django.forms.fields.RegexField object at 0x80451b290>, regex=r'^\w+$', max_length=30, min_length=None, error_message=<django.utils.functional.__proxy__ object at 0x80451b250>, *args=(), **kwargs={'help_text': <django.utils.functional.__proxy__ object at 0x80451b190>, 'label': <django.utils.functional.__proxy__ object at 0x80451b150>}) |
| 398 """ |
| 399 # error_message is just kept for backwards compatibility: |
| 400 if error_message: |
| 401 error_messages = kwargs.get('error_messages') or {} |
| 402 error_messages['invalid'] = error_message |
| error_message = <django.utils.functional.__proxy__ object at 0x80451b250> |
| /usr/local/lib/python2.6/site-packages/django/utils/functional.py in __wrapper__(self=<django.utils.functional.__proxy__ object at 0x80451b250>, *args=(), **kw={}) |
| 186 # Automatically triggers the evaluation of a lazy value and |
| 187 # applies the given magic method of the result type. |
| 188 res = self.__func(*self.__args, **self.__kw) |
| 189 for t in type(res).mro(): |
| 190 if t in self.__dispatch: |
| res undefined, self = <django.utils.functional.__proxy__ object at 0x80451b250>, self.__func undefined, self.__args undefined, self.__kw undefined |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/__init__.py in ugettext(message='This value must contain only letters, numbers and underscores.') |
| 60 |
| 61 def ugettext(message): |
| 62 return real_ugettext(message) |
| 63 |
| 64 def ungettext(singular, plural, number): |
| global real_ugettext = <function ugettext at 0x80451ff50>, message = 'This value must contain only letters, numbers and underscores.' |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/__init__.py in delayed_loader(*args=('This value must contain only letters, numbers and underscores.',), **kwargs={}) |
| 41 |
| 42 # Make the originally requested function call on the way out the door. |
| 43 return g['real_%s' % caller](*args, **kwargs) |
| 44 |
| 45 g = globals() |
| g = {'__all__': ['gettext', 'gettext_noop', 'gettext_lazy', 'ngettext', 'ngettext_lazy', 'string_concat', 'activate', 'deactivate', 'get_language', 'get_language_bidi', 'get_date_formats', 'get_partial_date_formats', 'check_for_language', 'to_locale', 'get_language_from_request', 'templatize', 'ugettext', 'ugettext_lazy', 'ungettext', 'deactivate_all'], '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>, 'AssertionError': <type 'exceptions.AssertionError'>, 'AttributeError': <type 'exceptions.AttributeError'>, 'BaseException': <type 'exceptions.BaseException'>, 'BufferError': <type 'exceptions.BufferError'>, 'BytesWarning': <type 'exceptions.BytesWarning'>, 'DeprecationWarning': <type 'exceptions.DeprecationWarning'>, 'EOFError': <type 'exceptions.EOFError'>, 'Ellipsis': Ellipsis, 'EnvironmentError': <type 'exceptions.EnvironmentError'>, ...}, '__doc__': '\nInternationalization support.\n', '__file__': '/usr/local/lib/python2.6/site-packages/django/utils/translation/__init__.pyc', '__name__': 'django.utils.translation', '__package__': 'django.utils.translation', '__path__': ['/usr/local/lib/python2.6/site-packages/django/utils/translation'], 'activate': <function activate at 0x8025c7410>, 'check_for_language': <function check_for_language at 0x8025c76e0>, 'deactivate': <function deactivate at 0x8025c7488>, ...}, caller = 'ugettext', args = ('This value must contain only letters, numbers and underscores.',), kwargs = {} |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/trans_real.py in ugettext(message='This value must contain only letters, numbers and underscores.') |
| 284 |
| 285 def ugettext(message): |
| 286 return do_translate(message, 'ugettext') |
| 287 |
| 288 def gettext_noop(message): |
| global do_translate = <function do_translate at 0x80451fe60>, message = 'This value must contain only letters, numbers and underscores.' |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/trans_real.py in do_translate(message='This value must contain only letters, numbers and underscores.', translation_function='ugettext') |
| 274 if _default is None: |
| 275 from django.conf import settings |
| 276 _default = translation(settings.LANGUAGE_CODE) |
| 277 result = getattr(_default, translation_function)(message) |
| 278 if isinstance(message, SafeData): |
| global _default = None, global translation = <function translation at 0x80451f7d0>, settings = <django.conf.LazySettings object at 0x8025bc390>, settings.LANGUAGE_CODE = 'en-us' |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/trans_real.py in translation(language='en-us') |
| 192 return res |
| 193 |
| 194 default_translation = _fetch(settings.LANGUAGE_CODE) |
| 195 current_translation = _fetch(language, fallback=default_translation) |
| 196 |
| default_translation undefined, _fetch = <function _fetch at 0x8045257d0>, settings = <django.conf.LazySettings object at 0x8025bc390>, settings.LANGUAGE_CODE = 'en-us' |
| /usr/local/lib/python2.6/site-packages/django/utils/translation/trans_real.py in _fetch(lang='en-us', fallback=None) |
| 178 |
| 179 for appname in settings.INSTALLED_APPS: |
| 180 app = import_module(appname) |
| 181 apppath = os.path.join(os.path.dirname(app.__file__), 'locale') |
| 182 |
| app = <module 'django.contrib.admin' from '/usr/local/...site-packages/django/contrib/admin/__init__.pyc'>, global import_module = <function import_module at 0x8025b4f50>, appname = 'grappelli' |
| /usr/local/lib/python2.6/site-packages/django/utils/importlib.py in import_module(name='grappelli', package=None) |
| 32 break |
| 33 level += 1 |
| 34 name = _resolve_name(name[level:], package, level) |
| 35 __import__(name) |
| 36 return sys.modules[name] |
| builtin __import__ = <built-in function __import__>, name = 'grappelli' |
<type 'exceptions.ImportError'>: No module named grappelli
args =
('No module named grappelli',)
message =
'No module named grappelli'