Code

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:

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.

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:

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

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.