frappe / frappe/pilot

ZoneInfoNotFoundError: 'No time zone found with key Asia/Calcutta' during Setup Wizard on Python 3.14 Pilot-ERPNext

Open
#450 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
107
Forks
63
Avg merge
2d 12h
Merged PRs (30d)
41

Description

When setting up a fresh instance of Frappe/ERPNext v16 using Pilot on an Ubuntu machine in India, the Setup Wizard crashes at step 3 (setup-wizard/3) with a ZoneInfoNotFoundError.

### App Versions
```
{
"frappe": "16.33.0",
"erpnext": "16.30.0"
}
```
### Route
```
setup-wizard/0
```
### Traceback
```
Traceback (most recent call last):
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/zoneinfo/_common.py", line 12, in load_tzdata
path = resources.files(package_name).joinpath(resource_name)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/importlib/resources/_common.py", line 46, in wrapper
return func(anchor)
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/importlib/resources/_common.py", line 56, in files
return from_package(resolve(anchor))
~~~~~~~^^^^^^^^
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/functools.py", line 982, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/importlib/resources/_common.py", line 82, in _
return importlib.import_module(cand)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1406, in _gcd_import
File "", line 1371, in _find_and_load
File "", line 1314, in _find_and_load_unlocked
File "", line 491, in _call_with_frames_removed
File "", line 1406, in _gcd_import
File "", line 1371, in _find_and_load
File "", line 1314, in _find_and_load_unlocked
File "", line 491, in _call_with_frames_removed
File "", line 1406, in _gcd_import
File "", line 1371, in _find_and_load
File "", line 1335, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'tzdata'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 139, in application
init_request(request)
~~~~~~~~~~~~^^^^^^^^^
File "apps/frappe/frappe/app.py", line 242, in init_request
frappe.local.http_request = HTTPRequest()
~~~~~~~~~~~^^
File "apps/frappe/frappe/auth.py", line 42, in __init__
self.set_session()
~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/auth.py", line 79, in set_session
frappe.local.login_manager = LoginManager()
~~~~~~~~~~~~^^
File "apps/frappe/frappe/auth.py", line 137, in __init__
self.make_session(resume=True)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "apps/frappe/frappe/auth.py", line 228, in make_session
frappe.local.session_obj = Session(
~~~~~~~^
user=self.user,
^^^^^^^^^^^^^^^
...<4 lines>...
audit_user=audit_user,
^^^^^^^^^^^^^^^^^^^^^^
)
^
File "apps/frappe/frappe/sessions.py", line 236, in __init__
self.resume()
~~~~~~~~~~~^^
File "apps/frappe/frappe/sessions.py", line 322, in resume
data = self.get_session_record()
File "apps/frappe/frappe/sessions.py", line 338, in get_session_record
r = self.get_session_data()
File "apps/frappe/frappe/sessions.py", line 355, in get_session_data
data = self.get_session_data_from_db()
File "apps/frappe/frappe/sessions.py", line 386, in get_session_data_from_db
.where(sessions.lastupdate > get_expired_threshold())
~~~~~~~~~~~~~~~~~~~~~^^
File "apps/frappe/frappe/sessions.py", line 512, in get_expired_threshold
now = frappe.utils.now()
File "apps/frappe/frappe/utils/data.py", line 424, in now
return now_datetime().strftime(DATETIME_FORMAT)
~~~~~~~~~~~~^^
File "apps/frappe/frappe/utils/data.py", line 373, in now_datetime
return datetime.datetime.now(ZoneInfo(get_system_timezone())).replace(tzinfo=None)
~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sadhu/.local/share/uv/python/cpython-3.14.7-linux-x86_64-gnu/lib/python3.14/zoneinfo/_common.py", line 29, in load_tzdata
raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Asia/Calcutta'

```
### Request Data
```
{
"type": "POST",
"args": {
"args": "{\"currency\":\"INR\",\"country\":\"India\",\"timezone\":\"Asia/Calcutta\",\"language\":\"English\",\"full_name\":\"asdf\",\"email\":\"asdf2@gmai.com\",\"password\":\",./\",\"persona_implementing_for\":\"A client I'm consulting for\",\"persona_company_size\":\"1–10\",\"persona_industry\":\"Manufacturing\",\"persona_current_system\":\"Tally\",\"module_accounting\":1,\"module_stock\":1,\"module_manufacturing\":1,\"module_projects\":0,\"company_name\":\"demo kk\",\"company_abbr\":\"DK\",\"chart_of_accounts\":\"India - Chart of Accounts\",\"fy_start_date\":\"2026-04-01\",\"fy_end_date\":\"2027-03-31\",\"setup_demo\":0}"
},
"headers": {},
"error_handlers": {},
"url": "/api/method/frappe.desk.page.setup_wizard.setup_wizard.setup_complete",
"request_id": null
}
```
### Response Data
```
{
"exception": "zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key Asia/Calcutta'",
"exc_type": "ZoneInfoNotFoundError"
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the setup_wizard.setup_complete endpoint and trace the failure through apps/frappe/frappe/auth.py, sessions.py, and utils/data.py, especially get_expired_threshold() and now_datetime(). Reproduce the fresh-instance setup on Python 3.14 with timezone Asia/Calcutta. Done means the setup wizard completes without ZoneInfoNotFoundError and timezone handling remains covered by an appropriate test.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.