frappe / frappe/pilot

Site installation ends with "ModuleNotFoundError: No module named 'sqlglot.parsers'"

Open
#413 11 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
101
Forks
61
Avg merge
2d 7h
Merged PRs (30d)
42

Description

In pilot's nice admin interface, after starting a site installation, choosing a site name and some apps to be installed, the admin interface went away after some minutes. Restarting was not possible and re-aborts right away, signaling the same error. The terminal shows this error log:

[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:34] "GET /api/v1/health HTTP/1.1" 200 -
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:37] "GET /api/v1/health HTTP/1.1" 200 -
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:40] "GET /api/v1/health HTTP/1.1" 200 -
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:43] "GET /api/v1/health HTTP/1.1" 200 -
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:46] "GET /api/v1/health HTTP/1.1" 200 -
[web] * Detected change in '/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/sqlglot/transforms.py', reloading
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:49] "GET /api/v1/health HTTP/1.1" 200 -
[web] * Restarting with stat
[web] Traceback (most recent call last):
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/utils/bench_helper.py", line 48, in invoke
[web] return super().invoke(ctx)
[web] ~~~~~~~~~~~~~~^^^^^
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/click/core.py", line 1970, in invoke
[web] return _process_result(sub_ctx.command.invoke(sub_ctx))
[web] ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/click/core.py", line 1353, in invoke
[web] return ctx.invoke(self.callback, **ctx.params)
[web] ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/click/core.py", line 907, in invoke
[web] return callback(*args, **kwargs)
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/click/decorators.py", line 34, in new_func
[web] return f(get_current_context(), *args, **kwargs)
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/commands/__init__.py", line 28, in _func
[web] ret = f(ctx.obj, *args, **kwargs)
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/commands/utils.py", line 808, in serve
[web] import frappe.app
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/app.py", line 17, in
[web] import frappe.api
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/api/__init__.py", line 89, in
[web] from frappe.api.v2 import url_rules as v2_rules
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/api/v2.py", line 17, in
[web] import frappe.client
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/client.py", line 11, in
[web] from frappe.desk.reportview import validate_args
[web] File "/home/peer/pilot/benches/dev-bench/apps/frappe/frappe/desk/reportview.py", line 10, in
[web] from sql_metadata import Parser
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/sql_metadata/__init__.py", line 20, in
[web] from sql_metadata.parser import Parser
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/sql_metadata/parser.py", line 20, in
[web] from sql_metadata.ast_parser import ASTParser
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/sql_metadata/ast_parser.py", line 13, in
[web] from sql_metadata.dialect_parser import DialectParser
[web] File "/home/peer/pilot/benches/dev-bench/env/lib/python3.14/site-packages/sql_metadata/dialect_parser.py", line 17, in
[web] from sqlglot.parsers.redshift import RedshiftParser
[web] ModuleNotFoundError: No module named 'sqlglot.parsers'
[web]
[web] No module named 'sqlglot.parsers'
[web] exited with code 1
[redis_queue] 1354740:signal-handler (1787733711) Received SIGTERM scheduling shutdown...
[redis_cache] 1354738:signal-handler (1787733711) Received SIGTERM scheduling shutdown...
[worker_default_short_long_1] 2026-08-26 10:41:51,048 Worker d6a0440e2ff84c2a9d31bbdd1479efe6 [PID 1354736]: warm shut down requested
[worker_default_short_long_1] 2026-08-26 10:41:51,049 Worker d6a0440e2ff84c2a9d31bbdd1479efe6: unsubscribing from channel rq:pubsub:d6a0440e2ff84c2a9d31bbdd1479efe6
[redis_cache] 1354738:M 26 Aug 2026 10:41:51.049 # User requested shutdown...
[redis_cache] 1354738:M 26 Aug 2026 10:41:51.049 # Redis is now ready to exit, bye bye...
[redis_queue] 1354740:M 26 Aug 2026 10:41:51.139 # User requested shutdown...
[redis_queue] 1354740:M 26 Aug 2026 10:41:51.139 # Redis is now ready to exit, bye bye...
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:52] "GET /api/v1/health HTTP/1.1" 200 -
[admin] ::ffff:127.0.0.1 - - [26/Aug/2026 10:41:55] "GET /api/v1/health HTTP/1.1" 200 -

Done in 21m 59s

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the site installation and start from apps/frappe/frappe/desk/reportview.py, following its import through sql_metadata/dialect_parser.py to the failing sqlglot.parsers.redshift import. Check the installed dependency versions and installation setup; done means the installation completes and the web process restarts without ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.