Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#12533 closed (invalid)

cannot import name smart_unicode

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


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.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by siasia

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by Alex

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 5 years ago by Jaza

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

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.