Trouble creating a new site

Hello guys,
I’m trying to create a new site after bench init frappe-bench but i get an error message every time i try to do so.

The full error message is as shown below:
bench new-site local.test
MySQL root password:
Installing frappe…
Updating DocTypes for frappe : [============================== ] 77%
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 110, in
main()
File “/home/user/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
return self.main(*args, **kwargs)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
rv = self.invoke(ctx)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
return callback(*args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/commands/site.py”, line 74, in new_site
_new_site(
File “/home/user/frappe-bench/apps/frappe/frappe/installer.py”, line 82, in _new_site
install_app(app, verbose=verbose, set_as_patched=not source_sql)
File “/home/user/frappe-bench/apps/frappe/frappe/installer.py”, line 186, in install_app
sync_for(name, force=True, sync_everything=True, verbose=verbose, reset_permissions=True)
File “/home/user/frappe-bench/apps/frappe/frappe/model/sync.py”, line 73, in sync_for
import_file_by_path(
File “/home/user/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 146, in import_file_by_path
import_doc(
File “/home/user/frappe-bench/apps/frappe/frappe/modules/import_file.py”, line 275, in import_doc
doc.insert()
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 293, in insert
self.run_post_save_methods()
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 1087, in run_post_save_methods
self.run_method(“on_update”)
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 943, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 1264, in composer
return composed(self, method, *args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 1246, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/user/frappe-bench/apps/frappe/frappe/model/document.py”, line 940, in fn
return method_object(*args, **kwargs)
File “/home/user/frappe-bench/apps/frappe/frappe/core/doctype/doctype/doctype.py”, line 381, in on_update
frappe.clear_cache(doctype=self.name)
File “/home/user/frappe-bench/apps/frappe/frappe/init.py”, line 852, in clear_cache
frappe.cache_manager.clear_doctype_cache(doctype)
File “/home/user/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 133, in clear_doctype_cache
clear_single(doctype)
File “/home/user/frappe-bench/apps/frappe/frappe/cache_manager.py”, line 130, in clear_single
cache.hdel(name, dt)
File “/home/user/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 225, in hdel
super(RedisWrapper, self).hdel(_name, key)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 3002, in hdel
return self.execute_command(‘HDEL’, name, *keys)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 901, in execute_command
return self.parse_response(conn, command_name, **options)
File “/home/user/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 921, in parse_response
return self.response_callbacks[command_name](response, **options)
TypeError: int() argument must be a string, a bytes-like object or a real number, not ‘list’

Hi @K.l.a.u.s,

I am not sure but you can try clearing the Redis cache by running the following commands:

redis-cli FLUSHALL
bench clear-cache
bench clear-website-cache
sudo systemctl restart redis-server

creating a new site again

bench new-site your-site.com

If the issue persists, you may want to consider checking your MySQL/MariaDB configuration or reviewing the error logs for additional information.

Thank You!

I cleared the redis cache but the error is still the same.
I’m using WSL ubuntu, though I tried installing a new site with Debian and Kali WSLs and the error still persists