New page error:No module named www.pagename


I am getting error after creating a page in www folder.
I am using V7

Traceback (most recent call last):
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 32, in render
data = render_page_by_language(path)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 101, in render_page_by_language
return render_page(path)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 117, in render_page
return build(path)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 124, in build
return build_page(path)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 137, in build_page
context = get_context(path)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 19, in get_context
context = build_context(context)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/website/”, line 65, in build_context
module = frappe.get_module(context.controller)
File “/home/amalendu/erpnext-AMC/frappe-bench/apps/frappe/frappe/”, line 643, in get_module
return importlib.import_module(modulename)
File “/usr/lib/python2.7/importlib/”, line 37, in import_module
ImportError: No module named www.dashboard

Anyone know why this error?

Share your code!

Hi @rmehta

i have dashboard.html file to show a dropdown box and a table

I have added, to fill the table dynamically.

The dashboard.html shows static data.
But when I added file in www folder, suddenly it shows the above error!

My file has nothing but,

from __future__ import unicode_literals
import frappe

def get_context(context):
	context.no_cache = True			
	if frappe.session.user == "Administrator":
		context.user = "Administrator"

If I remove this .py file then the page gets displayed!

Please help me somebody to resolve this issue!

I have run into a similar issue that may be the same. It relates to a folder structure.


ImportError: No module named example.index

hello @Derekbrenner

Do you have file in the same folder?

1 Like

That was the issue. Thank you!

Thank you.