Opened 8 years ago

Closed 8 years ago

#15056 closed (invalid)

'NoneType' object is not callable (smart_unicode is None)

Reported by: kenseehart Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Karen Tracey)

Running locally in debug mode

When I add an object, I get this traceback:


Request Method: POST
Request URL:
Django Version: 1.2 beta 1
Python Version: 2.6.5
Installed Applications:
Installed Middleware:

File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/" in get_response
  101.                     response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/" in wrapper
  240.                 return self.admin_site.admin_view(view)(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/" in _wrapped_view
  68.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/views/decorators/" in _wrapped_view_func
  69.         response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/" in inner
  194.             return view(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/" in _wrapper
  21.             return decorator(bound_func)(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/" in _wrapped_view
  68.                     response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/" in bound_func
  17.                 return func(self, *args2, **kwargs2)
File "/usr/local/lib/python2.6/dist-packages/django/db/" in _commit_on_success
  295.                     res = func(*args, **kw)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/" in add_view
  801.                 self.log_addition(request, new_object)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/" in log_addition
  428.             action_flag     = ADDITION
File "/usr/local/lib/python2.6/dist-packages/django/contrib/admin/" 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)

>         from django.utils.encoding import smart_unicode

Change History (2)

comment:1 Changed 8 years ago by Karen Tracey

Description: modified (diff)

Fixed formatting. Please use WikiFormatting and preview before posting. If this is recreatable on your machine, I suspect something is corrupt in your install. Un-installing and re-installing (I'd suggest a more recent level than 1.2 beta, though I don't recall that 1.2 beta ever had this particular error reported against it) may fix the problem. Plenty of people are able to add things via the admin without error...this is not a problem people have been reporting generally, so whatever is wrong is likely specific to your setup and most properly fixed by fixing that, not changing Django code to include an import were it should not be necessary.

comment:2 Changed 8 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

Closing invalid; this report doesn't contain enough detail to reproduce the problem, and as Karen suggests, it is suggestive of a corrupt install. Feel free to reopen if you can provide specific instructions for reproducing the problem.

Note: See TracTickets for help on using tickets.
Back to Top