ModuleNotFoundError: No module named 'bleach.css_sanitizer' on Save of new Wiki Page
Closed this issue · 1 comments
creamdory commented
Getting this error when saving a new Wiki Page.
website.js:177 Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 92, in application
response = frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 48, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1611, in call
return fn(*args, **newargs)
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_page.py", line 503, in update
patch.submit()
File "apps/frappe/frappe/model/document.py", line 1015, in submit
return self._submit()
File "apps/frappe/frappe/model/document.py", line 996, in _submit
return self.save()
File "apps/frappe/frappe/model/document.py", line 307, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 359, in _save
self.run_post_save_methods()
File "apps/frappe/frappe/model/document.py", line 1098, in run_post_save_methods
self.run_method("on_submit")
File "apps/frappe/frappe/model/document.py", line 928, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1280, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1262, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 925, in fn
return method_object(*args, **kwargs)
File "apps/wiki/wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.py", line 35, in on_submit
self.create_new_wiki_page()
File "apps/wiki/wiki/wiki/doctype/wiki_page_patch/wiki_page_patch.py", line 57, in create_new_wiki_page
self.new_wiki_page.save()
File "apps/frappe/frappe/model/document.py", line 307, in save
return self._save(*args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 329, in _save
return self.insert()
File "apps/frappe/frappe/model/document.py", line 262, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1059, in run_before_save_methods
self.run_method("before_save")
File "apps/frappe/frappe/model/document.py", line 928, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1280, in composer
return composed(self, method, *args, **kwargs)
File "apps/frappe/frappe/model/document.py", line 1262, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "apps/frappe/frappe/model/document.py", line 925, in fn
return method_object(*args, **kwargs)
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_page.py", line 29, in before_save
self.content = self.sanitize_html()
File "apps/wiki/wiki/wiki/doctype/wiki_page/wiki_page.py", line 96, in sanitize_html
from bleach.css_sanitizer import CSSSanitizer
ModuleNotFoundError: No module named 'bleach.css_sanitizer'
BreadGenie commented
duplicate of #209