Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

html5lib version 0.999999999 (latest) does not work with djangocms-text-ckeditor #344

Closed
JoeJasinski opened this issue Aug 6, 2016 · 2 comments

Comments

@JoeJasinski
Copy link

JoeJasinski commented Aug 6, 2016

If I install the latest version of html5lib, I get the following import error when I try to migrate. I'm using djangocms-text-ckeditor==3.0.1 and djangocms==3.3.1.

When I downgrade to html5lib==0.9999999, it works.

(myproject)$ ./manage.py migrate 
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "Sites/myproject/envs/myproject/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "Sites/myproject/envs/myproject/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "Sites/myproject/envs/myproject/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "Sites/myproject/envs/myproject/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "Sites/myproject/envs/myproject/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/Sites/myproject/proj/myproject/myproject/apps/pagefeature/models.py", line 8, in <module>
    from djangocms_text_ckeditor.fields import HTMLField
  File "/Sites/myproject/envs/myproject/lib/python2.7/site-packages/djangocms_text_ckeditor/fields.py", line 9, in <module>
    from .html import clean_html
  File "/Sites/myproject/envs/myproject/lib/python2.7/site-packages/djangocms_text_ckeditor/html.py", line 8, in <module>
    from html5lib import sanitizer, serializer, treebuilders, treewalkers
ImportError: cannot import name sanitizer
@JoeJasinski
Copy link
Author

I think this might be related to the following:

html5lib/html5lib-python#72
html5lib/html5lib-python#277

@czpython
Copy link
Contributor

czpython commented Aug 6, 2016

Closing as a duplicate of #336
djangocms-text-ckeditor currently pins html5lib to be less than 0.999999999

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants