First time here? Check out the FAQ!
1

Got failure: ImportError: cannot import name str_to_unicode

  • 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 manage.py runserver 0.0.0.0:9413 >
  • cannot import name str_to_unicode
  • Unhandled exception in thread started by <bound method="" command.inner_run="" of="" <django.contrib.staticfiles.management.commands.runserver.command="" 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/runserver.py", 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/base.py", 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/validation.py", 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/loading.py", 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/loading.py", 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/loading.py", 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/importlib.py", line 35, in import_module __import__(name)
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/__init__.py", 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/question.py", line 27, in <module> from askbot.models.post import Post, PostRevision
  • File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/post.py", 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/user.py", 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/forms.py", 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/forms.py", 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?

sharon's avatar
11
sharon
asked 2013-03-24 05:29:26 -0500, updated 2013-03-24 08:02:44 -0500
edit flag offensive 0 remove flag close merge delete

Comments

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
add a comment see more comments

2 Answers

0
Evgeny's avatar
13.2k
Evgeny
answered 2013-03-25 19:55:39 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
0

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

sharon's avatar
11
sharon
answered 2013-03-26 10:52:53 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments