ksa_compliance
ksa_compliance copied to clipboard
[Errno 2] No such file or directory: '/home/frappe/frappe-bench/sites/ager/logs/zatca.log'
I have a site running well in production mode But when I ran this command
bench new-site ager
It shows me this error
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/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 109, in <module>
main()
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
click.Group(commands=commands)(prog_name="bench")
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/frappe/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/frappe/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/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 65, in new_site
frappe.init(site=site, new_site=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 253, in init
setup_module_map()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1554, in setup_module_map
for module in get_module_list(app):
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1394, in get_module_list
return get_file_items(os.path.join(os.path.dirname(get_module(app_name).__file__), "modules.txt"))
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1343, in get_module
return importlib.import_module(modulename)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/frappe/frappe-bench/apps/ksa_compliance/ksa_compliance/__init__.py", line 5, in <module>
logger = get_logger('zatca', max_size=1_000_000)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/logger.py", line 73, in get_logger
site_handler = RotatingFileHandler(sitelog_filename, maxBytes=max_size, backupCount=file_count)
File "/usr/lib/python3.10/logging/handlers.py", line 155, in __init__
BaseRotatingHandler.__init__(self, filename, mode, encoding=encoding,
File "/usr/lib/python3.10/logging/handlers.py", line 58, in __init__
logging.FileHandler.__init__(self, filename, mode=mode,
File "/usr/lib/python3.10/logging/__init__.py", line 1169, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib/python3.10/logging/__init__.py", line 1201, in _open
return open_func(self.baseFilename, self.mode,
FileNotFoundError: [Errno 2] No such file or directory: '/home/frappe/frappe-bench/sites/ager/logs/zatca.log'