0

ImportError: cannot import name strip_tags
 

hi,

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 <django.contrib.staticfiles.management.commands.runserver.Command object at 0x2877650>>
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/django/core/management/commands/runserver.py", line 91, in inner_run
    self.validate(display_num_errors=True)
  File "/usr/lib/python2.6/site-packages/django/core/management/base.py", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.6/site-packages/django/core/management/validation.py", 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/loading.py", line 158, in get_app_errors
    self._populate()
  File "/usr/lib/python2.6/site-packages/django/db/models/loading.py", line 67, in _populate
    self.load_app(app_name)
  File "/usr/lib/python2.6/site-packages/django/db/models/loading.py", line 88, in load_app
    models = import_module('.models', app_name)
  File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/usr/lib/python2.6/site-packages/askbot/models/__init__.py", line 39, in <module>
    from askbot.models.question import Thread
  File "/usr/lib/python2.6/site-packages/askbot/models/question.py", line 27, in <module>
    from askbot.models.post import Post, PostRevision
  File "/usr/lib/python2.6/site-packages/askbot/models/post.py", line 35, in <module>
    from askbot.utils import markup
  File "/usr/lib/python2.6/site-packages/askbot/utils/markup.py", line 11, in <module>
    from askbot.utils.html import strip_tags
ImportError: cannot import name strip_tags

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
anshprat's avatar
46
anshprat
asked 11 years ago, updated 11 years ago

Comments

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

anshprat's avatar anshprat (11 years ago)

ping. any updates here?

anshprat's avatar anshprat (11 years ago)

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

anshprat's avatar anshprat (11 years ago)

@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 (11 years ago)
see more comments

1 Answer

1

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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
anshprat's avatar
46
anshprat
answered 11 years ago, updated 11 years ago
link

Comments

see more comments