Ask Your Question

Got failure: ImportError: cannot import name str_to_unicode

asked 2013-03-24 05:29:26 -0500

sharon's avatar

updated 2013-03-24 08:02:44 -0500

  • Hi all!
  • I am trying to setup askbot on an ubuntu server.
  • I use PostgreSql as my database.
  • I got such error information when I executed:
  • python runserver >
  • cannot import name str_to_unicode
  • Unhandled exception in thread started by <bound method="" command.inner_run="" of="" <"" object="" at="" 0x9401d4c="">> Traceback (most recent call last):
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/core/management/commands/", line 92, in inner_run self.validate(display_num_errors=True)
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/core/management/", line 280, in validate num_errors = get_validation_errors(s, app)
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/core/management/", line 35, in get_validation_errors
  • for (app_name, error) in get_app_errors().items():
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/db/models/", line 166, in get_app_errors self._populate()
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/db/models/", line 75, in _populate self.load_app(app_name)
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/db/models/", line 96, in load_app models = import_module('.models', app_name)
  • File "/usr/local/lib/python2.6/dist-packages/Django-1.5-py2.6.egg/django/utils/", line 35, in import_module __import__(name)
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/", line 39, in <module> from askbot.models.question import Thread
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/", line 27, in <module> from import Post, PostRevision
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/", line 29, in <module> from askbot.models.user import Activity
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/", line 22, in <module> from askbot.forms import DomainNameField
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/", line 15, in <module> from askbot.utils.forms import NextUrlField, UserNameField
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/utils/", line 3, in <module> from django.http import str_to_unicode
  • ImportError: cannot import name str_to_unicode

And the process stuck here without any progress. Is it possible that askbot0.7.48 is not compatible with django-1.5?

edit retag flag offensive close merge delete


Askbot is not compatible with Django 1.5 at the moment. There is another answer to this question - search by the str_to_unicode.

Evgeny's avatar Evgeny  ( 2013-03-25 19:54:48 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-26 10:52:53 -0500

sharon's avatar

Hi Evgeny, Thank you! Sorry, I did search before but I just didn't get any result on 'str_to_unicode', my fault. I will try the solution: pip uninstall Django pip install Django==1.4.5

edit flag offensive delete link more

answered 2013-03-25 19:55:39 -0500

Evgeny's avatar
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-03-24 05:29:26 -0500

Seen: 1,340 times

Last updated: Mar 26 '13