First time here? Check out the FAQ!

Revision history  [back]

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 > 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 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 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 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 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 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 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?

Got failure: ImportError: cannot import name str_to_unicode

  • Hi all!

  • all! I am trying to setup askbot on an ubuntu server.
  • server. I use PostgreSql as my database.
  • database. I got such error information when I executed:
  • python manage.py runserver 0.0.0.0:9413 >
  • " cannot import name str_to_unicode
  • str_to_unicode Unhandled exception in thread started by > Traceback (most recent call last):
  • 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)
  • 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)
  • 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
  • get_validation_errors for (app_name, error) in get_app_errors().items():
  • 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()
  • 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)
  • 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)
  • 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)
  • __import__(name) File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/__init__.py", line 39, in from askbot.models.question import Thread
  • Thread File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/question.py", line 27, in from askbot.models.post import Post, PostRevision
  • PostRevision File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/post.py", line 29, in from askbot.models.user import Activity
  • Activity File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/models/user.py", line 22, in from askbot.forms import DomainNameField
  • DomainNameField File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/forms.py", line 15, in from askbot.utils.forms import NextUrlField, UserNameField
  • UserNameField File "/usr/local/lib/python2.6/dist-packages/askbot-0.7.48-py2.6.egg/askbot/utils/forms.py", line 3, in from django.http import str_to_unicode
  • 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?progress.