﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
15056	'NoneType' object is not callable (smart_unicode is None)	kenseehart	nobody	"Running locally in debug mode

When I add an object, I get this traceback:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/tc/client/add/
Django Version: 1.2 beta 1
Python Version: 2.6.5
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.admin',
 'tc']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File ""/usr/local/lib/python2.6/dist-packages/django/core/handlers/base.py"" in get_response
  101.                     response = callback(request, *callback_args, **callback_kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py"" in wrapper
  240.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py"" in _wrapped_view
  68.                     response = view_func(request, *args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/views/decorators/cache.py"" in _wrapped_view_func
  69.         response = view_func(request, *args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/contrib/admin/sites.py"" in inner
  194.             return view(request, *args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py"" in _wrapper
  21.             return decorator(bound_func)(*args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py"" in _wrapped_view
  68.                     response = view_func(request, *args, **kwargs)
File ""/usr/local/lib/python2.6/dist-packages/django/utils/decorators.py"" in bound_func
  17.                 return func(self, *args2, **kwargs2)
File ""/usr/local/lib/python2.6/dist-packages/django/db/transaction.py"" in _commit_on_success
  295.                     res = func(*args, **kw)
File ""/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py"" in add_view
  801.                 self.log_addition(request, new_object)
File ""/usr/local/lib/python2.6/dist-packages/django/contrib/admin/options.py"" in log_addition
  428.             action_flag     = ADDITION
File ""/usr/local/lib/python2.6/dist-packages/django/contrib/admin/models.py"" in log_action
  19.         e = self.model(None, None, user_id, content_type_id, smart_unicode(object_id), object_repr[:200], action_flag, change_message)

Exception Type: TypeError at /admin/tc/client/add/
Exception Value: 'NoneType' object is not callable
____________________________________________

smart_unicode is None

This seems to be some kind of magic import related bug, since there doesn't seem to be any natural way for the symbol 'smart_unicode' to be assigned the value None.

A hack patch that fixes the problem follows (though it would be good to properly diagnose the problem)

14a15
>         from django.utils.encoding import smart_unicode


"		new	Uncategorized	1.2					Unreviewed	0	0	0	0	0	0
