I had used the following earlier :
bench use
bench --site install-app
this had given the same “Import error:No module named appname.hooks”.
I just now tried
bench use and
bench install-app
I get “TypeError: connect() argument 2 must be string, not None”…
Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 162, in _run_module_as_main
“main”, fname, loader, pkg_name)
File “/usr/lib/python2.7/runpy.py”, line 72, in _run_code
exec code in run_globals
File “/home/krithi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/krithi/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 700, in call
return self.main(*args, **kwargs)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 680, in main
rv = self.invoke(ctx)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 508, in invoke
return callback(*args, **kwargs)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py”, line 16, in new_func
return f(get_current_context(), *args, **kwargs)
File “/home/krithi/frappe-bench/apps/frappe/frappe/commands.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/home/krithi/frappe-bench/apps/frappe/frappe/commands.py”, line 164, in install_app
_install_app(app, verbose=context.verbose)
File “/home/krithi/frappe-bench/apps/frappe/frappe/installer.py”, line 92, in install_app
frappe.clear_cache()
File “/home/krithi/frappe-bench/apps/frappe/frappe/init.py”, line 414, in clear_cache
for fn in frappe.get_hooks(“clear_cache”):
File “/home/krithi/frappe-bench/apps/frappe/frappe/init.py”, line 687, in get_hooks
hooks = _dict(cache().get_value(“app_hooks”, load_app_hooks))
File “/home/krithi/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 47, in get_value
val = generator()
File “/home/krithi/frappe-bench/apps/frappe/frappe/init.py”, line 655, in load_app_hooks
for app in [app_name] if app_name else get_installed_apps(sort=True):
File “/home/krithi/frappe-bench/apps/frappe/frappe/init.py”, line 640, in get_installed_apps
installed = json.loads(db.get_global(“installed_apps”) or “[]”)
File “/home/krithi/frappe-bench/apps/frappe/frappe/database.py”, line 641, in get_global
return self.get_default(key, user)
File “/home/krithi/frappe-bench/apps/frappe/frappe/database.py”, line 653, in get_default
d = frappe.defaults.get_defaults(parent).get(key)
File “/home/krithi/frappe-bench/apps/frappe/frappe/defaults.py”, line 49, in get_defaults
globald = get_defaults_for()
File “/home/krithi/frappe-bench/apps/frappe/frappe/defaults.py”, line 154, in get_defaults_for
where parent = %s order by creation"“”, (parent,), as_dict=1)
File “/home/krithi/frappe-bench/apps/frappe/frappe/database.py”, line 105, in sql
self.connect()
File “/home/krithi/frappe-bench/apps/frappe/frappe/database.py”, line 51, in connect
use_unicode=True, charset=‘utf8’)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/init.py”, line 81, in Connect
return Connection(*args, **kwargs)
File “/home/krithi/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 193, in init
super(Connection, self).init(*args, **kwargs2)
TypeError: connect() argument 2 must be string, not None
After using bench use , on bench start, my page too is not getting displayed!!!
I get 404 Not found !
HELP!!