First time here? Check out the FAQ!

ImportError: cannot import name strip_tags


I am trying to package askbot 0.7.49 for epel/fedora. I get the following error while running..

cannot import name strip_tags
Unhandled exception in thread started by <bound method Command.inner_run of < object at 0x2877650>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/management/commands/", line 91, in inner_run
  File "/usr/lib/python2.6/site-packages/django/core/management/", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.6/site-packages/django/core/management/", line 30, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.6/site-packages/django/db/models/", line 158, in get_app_errors
  File "/usr/lib/python2.6/site-packages/django/db/models/", line 67, in _populate
  File "/usr/lib/python2.6/site-packages/django/db/models/", line 88, in load_app
    models = import_module('.models', app_name)
  File "/usr/lib/python2.6/site-packages/django/utils/", line 35, in import_module
  File "/usr/lib/python2.6/site-packages/askbot/models/", line 39, in <module>
    from askbot.models.question import Thread
  File "/usr/lib/python2.6/site-packages/askbot/models/", line 27, in <module>
    from import Post, PostRevision
  File "/usr/lib/python2.6/site-packages/askbot/models/", line 35, in <module>
    from askbot.utils import markup
  File "/usr/lib/python2.6/site-packages/askbot/utils/", line 11, in <module>
    from askbot.utils.html import strip_tags
ImportError: cannot import name strip_tags
anshprat's avatar
asked 2013-10-15 08:36:13 -0500, updated 2013-10-15 09:11:40 -0500
edit flag offensive 0 remove flag close merge delete


rpm -qa |grep Django Django14-1.4.8-1.el6.noarch

anshprat's avatar anshprat (2013-10-15 08:43:19 -0500) edit

ping. any updates here?

anshprat's avatar anshprat (2013-10-27 08:43:04 -0500) edit

didn't realise I had the question "deleted" for a while. Meant to delete another duplicate question.

anshprat's avatar anshprat (2013-10-27 13:22:31 -0500) edit

@anshprat, please try to reproduce this issue by installing askbot using virtualenv either from pypi or the git repository. We do not maintain the epel entry.

Evgeny's avatar Evgeny (2013-10-29 14:36:37 -0500) edit
add a comment see more comments

1 Answer


@Evgeny : resolved the issue. It was a polluted staging env + puppet + rpm. Basically rpm upgrade did not upgrade the utils/ properly. Removing the old rpm and installing askbot 0.7.49 rpm fixed the issue. Thanks for the help!

anshprat's avatar
answered 2013-11-02 03:14:32 -0500, updated 2013-11-02 03:15:07 -0500
edit flag offensive 0 remove flag delete link


add a comment see more comments