How to install frappe in mac os

https://frappeframework.com/docs/v13/user/en/installation#macos

I followed the steps in the above link to install frappe in my mac. It first asks sql root password. Then i reset the password it works. Finally it has error in site live

Updating Dashboard for frappe

ram: SystemSettings.enable_scheduler is UNSET

*** Scheduler is disabled ***

I followed bench --site sitename enable --scheduler
But it doesn’t work. Then i follow bench --site all enable-scheduler
After that i got this error
Enabled for endhiran
Enabled for ram
Enabled for ramdtsuriatree.com
Traceback (most recent call last):
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 556, in get_values
out = self._get_values_from_table(
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 819, in _get_values_from_table
return query.run(as_dict=as_dict, debug=debug, update=update, run=run, pluck=pluck)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 85, in execute_query
return frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 222, in sql
self._cursor.execute(query, values)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, “Table ‘_f2a12bf3d08b0fbb.tabdoctype’ doesn’t exist”)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/commands/scheduler.py”, line 46, in enable_scheduler
frappe.utils.scheduler.enable_scheduler()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 132, in enable_scheduler
toggle_scheduler(True)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/scheduler.py”, line 128, in toggle_scheduler
frappe.db.set_single_value(“System Settings”, “enable_scheduler”, int(enable))
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 730, in set_single_value
to_update = self._get_update_dict(
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 701, in _get_update_dict
modified = modified or now()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/data.py”, line 360, in now
return now_datetime().strftime(DATETIME_FORMAT)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/data.py”, line 307, in now_datetime
dt = convert_utc_to_user_timezone(datetime.datetime.utcnow())
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/data.py”, line 347, in convert_utc_to_user_timezone
time_zone = get_time_zone()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/data.py”, line 328, in get_time_zone
return frappe.cache().get_value(“time_zone”, _get_time_zone)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/redis_wrapper.py”, line 96, in get_value
val = generator()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/data.py”, line 321, in _get_time_zone
return frappe.db.get_system_setting(“time_zone”) or “Asia/Kolkata” # Default to India ?!
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 1150, in get_system_setting
return frappe.get_system_settings(key)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/init.py”, line 2285, in get_system_settings
local.system_settings = get_cached_doc(“System Settings”)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/init.py”, line 1083, in get_cached_doc
doc = get_doc(*args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/init.py”, line 1168, in get_doc
doc = frappe.model.document.get_doc(args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/model/document.py”, line 73, in get_doc
controller = get_controller(doctype)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 51, in get_controller
site_controllers[doctype] = import_controller(doctype)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 62, in import_controller
doctype_info = frappe.db.get_value(“DocType”, doctype, fieldname=“
”)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 459, in get_value
result = self.get_values(
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 576, in get_values
out = self.get_values_from_single(
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 613, in get_values_from_single
values = self.get_singles_dict(doctype)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 659, in get_singles_dict
queried_result = frappe.qb.get_query(
File “/Users/ramki/frappe-bench/apps/frappe/frappe/query_builder/utils.py”, line 85, in execute_query
return frappe.db.sql(query, params, *args, **kwargs) # nosemgrep
File “/Users/ramki/frappe-bench/apps/frappe/frappe/database/database.py”, line 222, in sql
self._cursor.execute(query, values)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 148, in execute
result = self._query(query)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/cursors.py”, line 310, in _query
conn.query(q)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 775, in _read_query_result
result.read()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 1156, in read
first_packet = self.connection._read_packet()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/connections.py”, line 725, in _read_packet
packet.raise_for_error()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/protocol.py”, line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/pymysql/err.py”, line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, “Table ‘_f2a12bf3d08b0fbb.tabsingles’ doesn’t exist”)

Any solutions?
or any other way to reinstall frappe in mac os

Hi,
This error occurs because the database tabdoctype is missing. For this, you need to take a backup of the DB bench backup After using this command, update the DB bench update --patch. If you are still facing the same issue, then you need to create manually in the MariaDB console.

For creating Manually :

USE your_database_name;
CREATE TABLE `tabDocType` (
  `name` varchar(140) NOT NULL,
  `module` varchar(140) NOT NULL,
  `document_type` varchar(140) NOT NULL,
  `is_submittable` int(1) DEFAULT '0',
  `istable` int(1) DEFAULT '0',
  `fields` longtext,
  `permissions` longtext,
  `search_fields` longtext,
  `is_tree` int(1) DEFAULT '0',
  `is_new` int(1) DEFAULT '0',
  `allow_import` int(1) DEFAULT '0',
  `allow_copy` int(1) DEFAULT '0',
  `disable_auto_email` int(1) DEFAULT '0',
  `workflow_state_field` varchar(140) DEFAULT NULL,
  `beta_functionality` int(1) DEFAULT '0',
  `document_type_version` varchar(140) DEFAULT NULL,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

After this you need to run the scheduler :
bench --site your_site_name enable-scheduler

Hope this will help you out.

Thank you.

Hi Bro,
Thankyou for the update. I tried it solved that issue. still it doesn’t work. Then i run bench doctor. The error will be

bench doctor
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Please make sure that Redis Queue runs @ redis://localhost:11002
Traceback (most recent call last):
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 611, in connect
sock = self.retry.call_with_retry(
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/retry.py”, line 46, in call_with_retry
return do()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 612, in
lambda: self._connect(), lambda error: self.disconnect(error)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 677, in _connect
raise err
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 665, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 61] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 104, in
main()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, line 19, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1130, in call
return self.main(*args, **kwargs)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1055, in main
rv = self.invoke(ctx)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/click/decorators.py”, line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/commands/init.py”, line 29, in _func
ret = f(frappe._dict(ctx.obj), *args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/commands/scheduler.py”, line 142, in doctor
return _doctor(site=site)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/doctor.py”, line 96, in doctor
workers_online = check_number_of_workers()
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/doctor.py”, line 83, in check_number_of_workers
return len(get_workers())
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/doctor.py”, line 11, in get_workers
with Connection(get_redis_conn()):
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 324, in wrapped_f
return self(f, *args, **kw)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 404, in call
do = self.iter(retry_state=retry_state)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 360, in iter
raise retry_exc.reraise()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 193, in reraise
raise self.last_attempt.result()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py”, line 451, in result
return self.__get_result()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/concurrent/futures/_base.py”, line 403, in __get_result
raise self._exception
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/tenacity/init.py”, line 407, in call
result = fn(*args, **kwargs)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 363, in get_redis_conn
redis_connection = RedisQueue.get_connection(**cred)
File “/Users/ramki/frappe-bench/apps/frappe/frappe/utils/redis_queue.py”, line 24, in get_connection
conn.ping()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/commands/core.py”, line 1132, in ping
return self.execute_command(“PING”, **kwargs)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/client.py”, line 1235, in execute_command
conn = self.connection or pool.get_connection(command_name, **options)
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 1387, in get_connection
connection.connect()
File “/Users/ramki/frappe-bench/env/lib/python3.10/site-packages/redis/connection.py”, line 617, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 61 connecting to localhost:11002. Connection refused.

Hi,
It seems that the Redis server is not running or is not accessible. Please make sure that the Redis server is running . You can try starting the Redis server and then try running bench start or bench doctor again.

If you still facing same issue check the redis is running:

redis-cli ping

If it’s not running then start the server:

redis-server

check the server queue is running in you port number:

redis-cli -p 11002 ping

If still it’s not running the start the bench:

bench start

If redis and queue is running but still facing the same problem the restart the queue:

bench restart-redis-cache

Then at last restart the entire frappe:

bench restart

Hope this will help you out.

Thank you