Item import error

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 403, in upload
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 223, in insert
self._validate()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 449, in _validate
self._extract_images_from_text_editor()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 792, in _extract_images_from_text_editor
extract_images_from_doc(self, df.fieldname)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 383, in extract_images_from_doc
content = extract_images_from_html(doc, content)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/file_manager.py”, line 417, in extract_images_from_html
content = re.sub(’<img[^>]src\s=\s*"’(.*?)["’]’, _save_file, content)
File “/home/frappe/frappe-bench/env/lib/python2.7/re.py”, line 155, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or buffer

Any idea?

Please be more specific.

  • what were you trying to import?
  • what was the format of the file you were attempting to import (xlsx, csv, txt, etc.)
  • were you using an import template?
  • did you alter anything in the first 22 lines of the template?
  • was the error immediate or did it process for a while before the error?

We need to know a little more about what you were doing whne this occurred,

BKM