ImportError: No module named shipping

Hello there,
I am new to Erpnext development and i just hit a snag.
So here is my situation, i have been reading on how to develop an app using erpnext( using the developers manual ). The manual instructs to create the app using the command:

$ bench new-app shipping

after that you have to install the app in your site using the command:

$ bench --site site1.local install-app shipping

Now after that you are instructed to visit your bench desk and reload the site, the was an error with the site displaying traceback calls. After a long search online i managed to fix the error only to find out a new error. One site user suggested i delete the app and install it again. But after doing s here is the new error

ImportError
ImportError: No module named shipping

Traceback (most recent call last)
File "/home/given/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__
return super(StaticDataMiddleware, self).__call__(environ, start_response)
File "/home/given/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/home/given/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wsgi.py", line 599, in __call__
return self.app(environ, start_response)
File "/home/given/frappe-bench/env/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
return ClosingIterator(app(environ, start_response), self.cleanup)
File "/home/given/frappe-bench/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 291, in application
return f(*args[:-2] + (request,))(*args[-2:])
File "/home/given/frappe-bench/apps/frappe/frappe/app.py", line 82, in application
response = handle_exception(e)
File "/home/given/frappe-bench/apps/frappe/frappe/app.py", line 172, in handle_exception
response = frappe.website.render.render("message", http_status_code=http_status_code)
File "/home/given/frappe-bench/apps/frappe/frappe/website/render.py", line 65, in render
data = render_page(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/render.py", line 117, in render_page
return build(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/render.py", line 124, in build
return build_page(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/render.py", line 137, in build_page
context = get_context(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/context.py", line 15, in get_context
context = get_page_context(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/router.py", line 35, in get_page_context
page_context = make_page_context(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/router.py", line 44, in make_page_context
context = resolve_route(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/router.py", line 18, in resolve_route
context = get_page_context_from_template(path)
File "/home/given/frappe-bench/apps/frappe/frappe/website/router.py", line 60, in get_page_context_from_template
app_path = frappe.get_app_path(app)
File "/home/given/frappe-bench/apps/frappe/frappe/__init__.py", line 691, in get_app_path
return get_pymodule_path(app_name, *joins)
File "/home/given/frappe-bench/apps/frappe/frappe/__init__.py", line 706, in get_pymodule_path
return os.path.join(os.path.dirname(get_module(scrub(modulename)).__file__), *joins)
File "/home/given/frappe-bench/apps/frappe/frappe/__init__.py", line 668, in get_module
return importlib.import_module(modulename)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named shipping

Any suggestions? Im moderately familiar with python

2 Likes

hello,

you have to delete app using bench remove-app not manually, to fix this problem just remove shipping from sites/apps.txt and do bench migrate

1 Like

Thank you so much. This solved my problem