Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#12533 closed (invalid)

cannot import name smart_unicode

Reported by: siasia Owned by: jkocherhans
Component: Uncategorized Version: dev
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


After update of my django version I'm getting following traceback:


Request Method: GET
Request URL: http://localhost:8000/news/
Django Version: 1.2 pre-alpha
Python Version: 2.6.4
Installed Applications:
Installed Middleware:

File "/usr/lib/python2.6/site-packages/django/core/handlers/" in get_response
  90.                         request.path_info)
File "/usr/lib/python2.6/site-packages/django/core/" in resolve
  222.                     sub_match = pattern.resolve(new_path)
File "/usr/lib/python2.6/site-packages/django/core/" in resolve
  220.             for pattern in self.url_patterns:
File "/usr/lib/python2.6/site-packages/django/core/" in _get_url_patterns
  249.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/lib/python2.6/site-packages/django/core/" in _get_urlconf_module
  244.             self._urlconf_module = import_module(self.urlconf_name)
File "/usr/lib/python2.6/site-packages/django/utils/" in import_module
  35.     __import__(name)
File "/home/siasia/projects/fish/fish/../fish/" in <module>
  6. admin.autodiscover()
File "/usr/lib/python2.6/site-packages/django/contrib/admin/" in autodiscover
  56.         import_module("%s.admin" % app)
File "/usr/lib/python2.6/site-packages/django/utils/" in import_module
  35.     __import__(name)
File "/home/siasia/projects/fish/fish/app/" in <module>
  7. from tinymce.widgets import TinyMCE
File "/home/siasia/projects/fish/fish/tinymce/" in <module>
  14. from django.forms.util import smart_unicode

Exception Type: ImportError at /news/
Exception Value: cannot import name smart_unicode

Some bisection on svn revisions also shown that this error has been introduced in revision 12098 and still reproduces in latest 12117. I hope this would help.

Change History (3)

comment:1 by siasia, 14 years ago

comment:2 by Alex Gaynor, 14 years ago

Resolution: invalid
Status: newclosed

This is a bug in your code, smart_unicode doesn't like in django.form.utils, it likes it django.utils.encoding. The fact that it was available at the location is an artifact of Django's use of that, apparently it's no longer used there so the import was removed.

comment:3 by Jaza, 14 years ago

This is an issue in django-tinymce, and it has a ticket and patch here:

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