Issue encountered with Web Form


Trust everyone’s doing great. I encountered an error with Web Forms. Please find steps below and let me know if I’m missing something:

  1. Created a new custom DocType

  2. Created a Web Form linked to the new DocType

  3. Tried to view the web form and got the error below

    Traceback (most recent call last): File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 32, in render data = render_page_by_language(path) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 101, in render_page_by_language return render_page(path) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 117, in render_page return build(path) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 124, in build return build_page(path) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 137, in build_page context = get_context(path) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 18, in get_context context = build_context(context) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/", line 80, in build_context ret = context.doc.get_context(context) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/doctype/web_form/", line 145, in get_context self.build_as_list(context) File "/home/erpnext/frappe-bench/apps/frappe/frappe/website/doctype/web_form/", line 207, in build_as_list get_list_context(context) File "/home/erpnext/frappe-bench/apps/frappe/frappe/www/", line 19, in get_context context.update(get_list_context(context, doctype) or {}) File "/home/erpnext/frappe-bench/apps/frappe/frappe/www/", line 117, in get_list_context module = load_doctype_module(doctype) File "/home/erpnext/frappe-bench/apps/frappe/frappe/modules/", line 173, in load_doctype_module raise ImportError, 'Module import failed for {0} ({1})'.format(doctype, module_name) ImportError: Module import failed for Visitor (erpnext.crm.doctype.visitor.visitor)

Kindly assist in this matter


AFAIK, ERPNext CRM does not have a concept called Visitor.

But this is a great example why should contribute your extensions to the core so that you don’t face such problems.

Lol! Hi @rmehta , good to hear from you. Trust me, I’m a strong believer in adding extensions to the core. The visitor form is only a custom DocType for capturing data. Any reason why a custom DocType should return this error?


Kind regards,

Hi @rmehta

Trust your weekend was good. Any update on this issue please?

Kind regards,