Execute "bench new-site" error "'super'object has no attribute'hget'"

Traceback (most recent call last):
File “/usr/lib/python2.7/runpy.py”, line 174, 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/wang/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 79, in
main()
File “/home/wang/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 16, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/wang/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/wang/frappe-bench/apps/frappe/frappe/commands/site.py”, line 26, in new_site
verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
File “/home/wang/frappe-bench/apps/frappe/frappe/commands/site.py”, line 56, in _new_site
admin_password=admin_password, verbose=verbose, source_sql=source_sql,force=force, reinstall=reinstall)
File “/home/wang/frappe-bench/apps/frappe/frappe/installer.py”, line 41, in install_db
remove_missing_apps()
File “/home/wang/frappe-bench/apps/frappe/frappe/installer.py”, line 338, in remove_missing_apps
installed_apps = json.loads(frappe.db.get_global(“installed_apps”) or “[]”)
File “/home/wang/frappe-bench/apps/frappe/frappe/database.py”, line 686, in get_global
return self.get_default(key, user)
File “/home/wang/frappe-bench/apps/frappe/frappe/database.py”, line 698, in get_default
d = self.get_defaults(key, parent)
File “/home/wang/frappe-bench/apps/frappe/frappe/database.py”, line 704, in get_defaults
defaults = frappe.defaults.get_defaults(parent)
File “/home/wang/frappe-bench/apps/frappe/frappe/defaults.py”, line 72, in get_defaults
globald = get_defaults_for()
File “/home/wang/frappe-bench/apps/frappe/frappe/defaults.py”, line 175, in get_defaults_for
defaults = frappe.cache().hget(“defaults”, parent)
File “/home/wang/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 163, in hget
value = super(redis.Redis, self).hget(_name, key)
AttributeError: ‘super’ object has no attribute ‘hget’

Please help me. I’ve been stuck for a long time.

Hi Wjp43045,

bench clear-cache and bench clear-website-cache may help.

Also post the startup output from ‘bench start’ and check the logs for clues.

What are your installed apps and what version?

Maybe try this bench setup redis

The fix provided at Getting error while Creating New Site - #12 by Ashutosh_Benni worked for me. In case someone else finds this thread.

1 Like