Created a Login Api and it working but giving me authentication error and scheduler error in bench

then what can be the reason for this error is scheduler is enabled i am trying to test the api from post man and in the terminal of benvh its showing this error 16:14 watch.1 | Watching for changes…
13:16:16 web.1 | 127.0.0.1 - - [26/Aug/2023 13:16:16] “GET /api/method/crlm_1.api.login HTTP/1.1” 200 -
13:16:35 web.1 | 127.0.0.1 - - [26/Aug/2023 13:16:35] “GET /api/method/crlm_1.api.login HTTP/1.1” 200 -
13:17:06 schedule.1 | File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
13:17:06 schedule.1 | return _run_code(code, main_globals, None,
13:17:06 schedule.1 | File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
13:17:06 schedule.1 | exec(code, run_globals)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
13:17:06 schedule.1 | main()
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
13:17:06 schedule.1 | click.Group(commands=commands)(prog_name=“bench”)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
13:17:06 schedule.1 | return self.main(*args, **kwargs)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
13:17:06 schedule.1 | rv = self.invoke(ctx)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
13:17:06 schedule.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
13:17:06 schedule.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
13:17:06 schedule.1 | return ctx.invoke(self.callback, **ctx.params)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
13:17:06 schedule.1 | return callback(*args, **kwargs)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/commands/scheduler.py”, line 182, in start_scheduler
13:17:06 schedule.1 | start_scheduler()
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 41, in start_scheduler
13:17:06 schedule.1 | enqueue_events_for_all_sites()
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 59, in enqueue_events_for_all_sites
13:17:06 schedule.1 | enqueue_events_for_site(site=site)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 74, in enqueue_events_for_site
13:17:06 schedule.1 | if is_scheduler_inactive():
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 113, in is_scheduler_inactive
13:17:06 schedule.1 | if is_scheduler_disabled(verbose=verbose):
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 126, in is_scheduler_disabled
13:17:06 schedule.1 | frappe.db.get_single_value(“System Settings”, “enable_scheduler”)
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/database/database.py”, line 786, in get_single_value
13:17:06 schedule.1 | ).run()
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 87, in execute_query
13:17:06 schedule.1 | result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
13:17:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/database/database.py”, line 248, in sql
13:17:06 schedule.1 | traceback.print_stack()
13:17:06 schedule.1 | Error in query:
13:17:06 schedule.1 | (‘SELECT value FROM tabSingles WHERE doctype=%(param1)s AND field=%(param2)s’, {‘param1’: ‘System Settings’, ‘param2’: ‘enable_scheduler’})
13:18:06 schedule.1 | File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
13:18:06 schedule.1 | return _run_code(code, main_globals, None,
13:18:06 schedule.1 | File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
13:18:06 schedule.1 | exec(code, run_globals)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 109, in
13:18:06 schedule.1 | main()
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 18, in main
13:18:06 schedule.1 | click.Group(commands=commands)(prog_name=“bench”)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 829, in call
13:18:06 schedule.1 | return self.main(*args, **kwargs)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 782, in main
13:18:06 schedule.1 | rv = self.invoke(ctx)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
13:18:06 schedule.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1259, in invoke
13:18:06 schedule.1 | return _process_result(sub_ctx.command.invoke(sub_ctx))
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1066, in invoke
13:18:06 schedule.1 | return ctx.invoke(self.callback, **ctx.params)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 610, in invoke
13:18:06 schedule.1 | return callback(*args, **kwargs)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/commands/scheduler.py”, line 182, in start_scheduler
13:18:06 schedule.1 | start_scheduler()
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 41, in start_scheduler
13:18:06 schedule.1 | enqueue_events_for_all_sites()
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 59, in enqueue_events_for_all_sites
13:18:06 schedule.1 | enqueue_events_for_site(site=site)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 74, in enqueue_events_for_site
13:18:06 schedule.1 | if is_scheduler_inactive():
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 113, in is_scheduler_inactive
13:18:06 schedule.1 | if is_scheduler_disabled(verbose=verbose):
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 126, in is_scheduler_disabled
13:18:06 schedule.1 | frappe.db.get_single_value(“System Settings”, “enable_scheduler”)
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/database/database.py”, line 786, in get_single_value
13:18:06 schedule.1 | ).run()
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 87, in execute_query
13:18:06 schedule.1 | result = frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
13:18:06 schedule.1 | File “/home/administration/frappe-bench/apps/frappe/frappe/database/database.py”, line 248, in sql
13:18:06 schedule.1 | traceback.print_stack()
13:18:06 schedule.1 | Error in query:
13:18:06 schedule.1 | (‘SELECT value FROM tabSingles WHERE doctype=%(param1)s AND field=%(param2)s’, {‘param1’: ‘System Settings’, ‘param2’: ‘enable_scheduler’})

this is the error i am getting and postman shows this output

Can anyone help

Its the error from your code. Please share your python code