frappe / wiki

Free and Open Source Wiki built on top of Frappe
https://frappe.io/wiki
MIT License
219 stars 168 forks source link

Wiki Page Save: ModuleNotFoundError: No module named 'bleach.css_sanitizer' #209

Closed djpalshikar closed 7 months ago

djpalshikar commented 7 months ago

After New Frappe Wiki install on V14. Create and Saved a Page : The following error is seen - App Versions { "custom_sapcon": "0.0.1", "erpnext": "14.53.0", "erpnext_support": "0.2.1", "frappe": "14.60.0", "hrms": "14.18.1", "india_compliance": "14.19.6", "indiamart_erpnext_integration": "0.14.0" } Route Form/Wiki Page/new-wiki-page-ygrdxthlwm Error Report Traceback (most recent call last): File "apps/frappe/frappe/app.py", line 95, in application response = frappe.api.handle() File "apps/frappe/frappe/api.py", line 55, in handle return frappe.handler.handle() File "apps/frappe/frappe/handler.py", line 47, in handle data = execute_cmd(cmd) File "apps/frappe/frappe/handler.py", line 85, in execute_cmd return frappe.call(method, **frappe.form_dict) File "apps/frappe/frappe/__init__.py", line 1628, in call return fn(*args, **newargs) File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs doc.save() File "apps/frappe/frappe/model/document.py", line 309, in save return self._save(*args, **kwargs) File "apps/frappe/frappe/model/document.py", line 331, 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 1056, in run_before_save_methods self.run_method("before_save") File "apps/frappe/frappe/model/document.py", line 919, in run_method out = Document.hook(fn)(self, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1281, in composer return composed(self, method, *args, **kwargs) File "apps/frappe/frappe/model/document.py", line 1263, in runner add_to_return_value(self, fn(self, *args, **kwargs)) File "apps/frappe/frappe/model/document.py", line 916, 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' Request Data { "type": "POST", "args": { "doc": "{\"docstatus\":0,\"doctype\":\"Wiki Page\",\"name\":\"new-wiki-page-ygrdxthlwm\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"[dhananjay@sapcon.in](mailto:dhananjay@sapcon.in)\",\"published\":0,\"allow_guest\":1,\"content\":\"Capacity PLanning for Production and Sales Teams \\n\\n About \\n Capps: Is a transparent solution designed to provide the consistent delivery times and production throughput for \",\"title\":\"Capps: Overview \",\"route\":\"wiki/capps/intro\"}", "action": "Save" }, "btn": { "jQuery360079870611999102171": { "events": { "click": [ { "type": "click", "origType": "click", "guid": 726, "namespace": "" } ] } } }, "freeze": true, "headers": {}, "error_handlers": {}, "url": "/api/method/frappe.desk.form.save.savedocs" } Response JSON { "exception": "ModuleNotFoundError: No module named 'bleach.css_sanitizer'" }

BreadGenie commented 7 months ago

use version-14 branch of Wiki along with Frappe Framework v14