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

Description

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

Environment:

Request Method: GET
Request URL: http://localhost:8000/news/
Django Version: 1.2 pre-alpha
Python Version: 2.6.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.admin',
 'django.contrib.webdesign',
 'django.contrib.sites',
 'django.contrib.flatpages',
 'south',
 'app',
 'tinymce',
 'debug_toolbar']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.csrf.middleware.CsrfMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'debug_toolbar.middleware.DebugToolbarMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware')


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

http://code.google.com/p/django-tinymce/issues/detail?id=63

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