Title: ZoneInfoNotFoundError(f"No time zone found with key {key}") · Issue #1620 · python-kasa/python-kasa · GitHub
Open Graph Title: ZoneInfoNotFoundError(f"No time zone found with key {key}") · Issue #1620 · python-kasa/python-kasa
X Title: ZoneInfoNotFoundError(f"No time zone found with key {key}") · Issue #1620 · python-kasa/python-kasa
Description: I had to install pipx to get kasa to install on my OS. Bottom line Issue: ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key MST7MDT' Environment: OS : Debian ...
Open Graph Description: I had to install pipx to get kasa to install on my OS. Bottom line Issue: ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found wit...
X Description: I had to install pipx to get kasa to install on my OS. Bottom line Issue: ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time ...
Mail addresses
user@example.com
Opengraph URL: https://github.com/python-kasa/python-kasa/issues/1620
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ZoneInfoNotFoundError(f\"No time zone found with key {key}\")","articleBody":"\nI had to install pipx to get kasa to install on my OS.\n\nBottom line Issue: \nZoneInfoNotFoundError(f\"No time zone found with key {key}\")\nzoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key MST7MDT'\n\nEnvironment:\nOS : Debian GNU/Linux 13 (trixie)\nOS Kernel : 6.12.47+rpt-rpi-v8\n\n----------------------------\nkasa --debug --host 172.16.64.114 on\nDiscovering device 172.16.64.114 for 10 seconds\nDEBUG:kasa.discover:[DISCOVERY] 172.16.64.114 \u003e\u003e {'system': {'get_sysinfo': {}}}\nDEBUG:kasa.discover:Waiting a total of 10 seconds for responses...\nDEBUG:kasa.discover:[DISCOVERY] 172.16.64.114 \u003c\u003c {'system': {'get_sysinfo': {'active_mode': 'schedule',\n 'alias': '#MASKED_NAME#',\n 'dev_name': 'Smart Wi-Fi Plug Mini',\n 'deviceId': 'REDACTED_0A22BC71268038F2A8D3C781DBDEBED',\n 'err_code': 0,\n 'feature': 'TIM',\n 'hwId': 'REDACTED_1D91460D5F5201C65C8A549',\n 'hw_ver': '5.0',\n 'icon_hash': '',\n 'latitude_i': 0,\n 'led_off': 0,\n 'longitude_i': 0,\n 'mac': 'E4:C3:2A:00:00:00',\n 'mic_type': 'IOT.SMARTPLUGSWITCH',\n 'model': 'HS105(US)',\n 'next_action': {'action': 1,\n 'id': '5DBDFAA268B419837121453B876D957C',\n 'schd_sec': 59400,\n 'type': 1},\n 'obd_src': 'tplink',\n 'oemId': 'REDACTED_350D76F11728AC99180D5E8',\n 'on_time': 0,\n 'relay_state': 0,\n 'rssi': -38,\n 'status': 'configured',\n 'sw_ver': '1.0.2 Build 200819 Rel.103733',\n 'updating': 0}}}\nDEBUG:kasa.device:Initializing 172.16.64.114 of type \u003cclass 'kasa.iot.iotplug.IotPlug'\u003e\nDEBUG:kasa.device_factory:Finding protocol for 172.16.64.114\nDEBUG:kasa.device_factory:Finding protocol for DeviceFamily.IotSmartPlugSwitch\nDEBUG:kasa.device_factory:Finding transport for IOT.XOR\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Schedule (schedule) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Usage (schedule) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Antitheft (anti_theft) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Time (time) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Cloud (cnCloud) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotdevice:Adding module \u003cModule Led (system) for 172.16.64.114\u003e\nDEBUG:kasa.iot.iotmodule:Initial update, so consider supported: schedule\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Schedule (schedule) for 172.16.64.114\u003e: {'schedule': {'get_rules': {}, 'get_next_action': {}}}\nDEBUG:kasa.iot.iotmodule:Initial update, so consider supported: schedule\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Usage (schedule) for 172.16.64.114\u003e: {'schedule': {'get_realtime': {}, 'get_daystat': {'year': 2025, 'month': 12}, 'get_monthstat': {'year': 2025}}}\nDEBUG:kasa.iot.iotmodule:Initial update, so consider supported: anti_theft\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Antitheft (anti_theft) for 172.16.64.114\u003e: {'anti_theft': {'get_rules': {}, 'get_next_action': {}}}\nDEBUG:kasa.iot.iotmodule:Initial update, so consider supported: time\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Time (time) for 172.16.64.114\u003e: {'time': {'get_time': {}, 'get_timezone': {}}}\nDEBUG:kasa.iot.iotmodule:Initial update, so consider supported: cnCloud\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Cloud (cnCloud) for 172.16.64.114\u003e: {'cnCloud': {'get_info': {}}}\nDEBUG:kasa.iot.iotdevice:Adding query for \u003cModule Led (system) for 172.16.64.114\u003e: {}\nDEBUG:kasa.protocols.iotprotocol:172.16.64.114 \u003e\u003e {\"system\":{\"get_sysinfo\":{}},\"schedule\":{\"get_rules\":{},\"get_next_action\":{},\"get_realtime\":{},\"get_daystat\":{\"year\":2025,\"month\":12},\"get_monthstat\":{\"year\":2025}},\"anti_theft\":{\"get_rules\":{},\"get_next_action\":{}},\"time\":{\"get_time\":{},\"get_timezone\":{}},\"cnCloud\":{\"get_info\":{}}}\nDEBUG:kasa.transports.xortransport:Device 172.16.64.114 sending query {\"system\":{\"get_sysinfo\":{}},\"schedule\":{\"get_rules\":{},\"get_next_action\":{},\"get_realtime\":{},\"get_daystat\":{\"year\":2025,\"month\":12},\"get_monthstat\":{\"year\":2025}},\"anti_theft\":{\"get_rules\":{},\"get_next_action\":{}},\"time\":{\"get_time\":{},\"get_timezone\":{}},\"cnCloud\":{\"get_info\":{}}}\nDEBUG:kasa.transports.xortransport:Device 172.16.64.114 query response received\nDEBUG:kasa.protocols.iotprotocol:172.16.64.114 \u003c\u003c {'anti_theft': {'get_next_action': {'err_code': -2,\n 'err_msg': 'member not support'},\n 'get_rules': {'enable': 0,\n 'err_code': 0,\n 'rule_list': [],\n 'version': 2}},\n 'cnCloud': {'get_info': {'binded': 1,\n 'cld_connection': 1,\n 'err_code': 0,\n 'fwDlPage': '',\n 'fwNotifyType': -1,\n 'illegalType': 0,\n 'server': 'n-devs.tplinkcloud.com',\n 'stopConnect': 0,\n 'tcspInfo': '',\n 'tcspStatus': 1,\n 'username': 'user@example.com'}},\n 'schedule': {'get_daystat': {'day_list': [{'day': 1,\n 'month': 12,\n 'time': 390,\n 'year': 2025},\n {'day': 2,\n 'month': 12,\n 'time': 390,\n 'year': 2025},\n {'day': 3,\n 'month': 12,\n 'time': 390,\n 'year': 2025},\n {'day': 4,\n 'month': 12,\n 'time': 390,\n 'year': 2025},\n {'day': 5,\n 'month': 12,\n 'time': 390,\n 'year': 2025},\n {'day': 6,\n 'month': 12,\n 'time': 0,\n 'year': 2025}],\n 'err_code': 0},\n 'get_monthstat': {'err_code': 0,\n 'month_list': [{'month': 6,\n 'time': 10800,\n 'year': 2025},\n {'month': 7,\n 'time': 11157,\n 'year': 2025},\n {'month': 8,\n 'time': 10998,\n 'year': 2025},\n {'month': 9,\n 'time': 10799,\n 'year': 2025},\n {'month': 10,\n 'time': 11159,\n 'year': 2025},\n {'month': 11,\n 'time': 11639,\n 'year': 2025},\n {'month': 12,\n 'time': 1950,\n 'year': 2025},\n {'month': 1,\n 'time': 13019,\n 'year': 2025},\n {'month': 2,\n 'time': 11759,\n 'year': 2025},\n {'month': 3,\n 'time': 13018,\n 'year': 2025},\n {'month': 4,\n 'time': 12600,\n 'year': 2025},\n {'month': 5,\n 'time': 11557,\n 'year': 2025}]},\n 'get_next_action': {'action': 1,\n 'err_code': 0,\n 'id': '5DBDFAA268B419837121453B876D957C',\n 'schd_time': 59400,\n 'type': 1},\n 'get_realtime': {'err_code': -2, 'err_msg': 'member not support'},\n 'get_rules': {'enable': 1,\n 'err_code': 0,\n 'rule_list': [{'eact': -1,\n 'enable': 1,\n 'id': '5DBDFAA268B419837121453B876D957C',\n 'name': 'name',\n 'repeat': 1,\n 'sact': 1,\n 'smin': 990,\n 'stime_opt': 0,\n 'wday': [1, 1, 1, 1, 1, 1, 1]},\n {'eact': -1,\n 'enable': 1,\n 'id': '3BFB45E465E0A4D574B01A1B55A58B84',\n 'name': 'name',\n 'repeat': 1,\n 'sact': 0,\n 'smin': 1380,\n 'stime_opt': 0,\n 'wday': [1, 1, 1, 1, 1, 1, 1]}],\n 'version': 2}},\n 'system': {'get_sysinfo': {'active_mode': 'schedule',\n 'alias': '#MASKED_NAME#',\n 'dev_name': 'Smart Wi-Fi Plug Mini',\n 'deviceId': 'REDACTED_0A22BC71268038F2A8D3C781DBDEBED',\n 'err_code': 0,\n 'feature': 'TIM',\n 'hwId': 'REDACTED_1D91460D5F5201C65C8A549',\n 'hw_ver': '5.0',\n 'icon_hash': '',\n 'latitude_i': 0,\n 'led_off': 0,\n 'longitude_i': 0,\n 'mac': 'E4:C3:2A:00:00:00',\n 'mic_type': 'IOT.SMARTPLUGSWITCH',\n 'model': 'HS105(US)',\n 'next_action': {'action': 1,\n 'id': '5DBDFAA268B419837121453B876D957C',\n 'schd_sec': 59400,\n 'type': 1},\n 'obd_src': 'tplink',\n 'oemId': 'REDACTED_350D76F11728AC99180D5E8',\n 'on_time': 0,\n 'relay_state': 0,\n 'rssi': -38,\n 'status': 'configured',\n 'sw_ver': '1.0.2 Build 200819 Rel.103733',\n 'updating': 0}},\n 'time': {'get_time': {'err_code': 0,\n 'hour': 6,\n 'mday': 6,\n 'min': 33,\n 'month': 12,\n 'sec': 12,\n 'year': 2025},\n 'get_timezone': {'err_code': 0, 'index': 10}}}\nRaised error: 'No time zone found with key MST7MDT'\nTraceback (most recent call last):\n File \"/usr/lib/python3.13/zoneinfo/_common.py\", line 12, in load_tzdata\n return resources.files(package_name).joinpath(resource_name).open(\"rb\")\n ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^\n File \"/usr/lib/python3.13/importlib/resources/_common.py\", line 46, in wrapper\n return func(anchor)\n File \"/usr/lib/python3.13/importlib/resources/_common.py\", line 56, in files\n return from_package(resolve(anchor))\n ~~~~~~~^^^^^^^^\n File \"/usr/lib/python3.13/functools.py\", line 934, in wrapper\n return dispatch(args[0].__class__)(*args, **kw)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^\n File \"/usr/lib/python3.13/importlib/resources/_common.py\", line 82, in _\n return importlib.import_module(cand)\n ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"/usr/lib/python3.13/importlib/__init__.py\", line 88, in import_module\n return _bootstrap._gcd_import(name[level:], package, level)\n ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1387, in _gcd_import\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1360, in _find_and_load\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1310, in _find_and_load_unlocked\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 488, in _call_with_frames_removed\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1387, in _gcd_import\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1360, in _find_and_load\n File \"\u003cfrozen importlib._bootstrap\u003e\", line 1324, in _find_and_load_unlocked\nModuleNotFoundError: No module named 'tzdata'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"/root/.local/bin/kasa\", line 7, in \u003cmodule\u003e\n sys.exit(cli())\n ~~~^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cli/common.py\", line 282, in __call__\n asyncio.run(self.main(*args, **kwargs))\n ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.13/asyncio/runners.py\", line 195, in run\n return runner.run(main)\n ~~~~~~~~~~^^^^^^\n File \"/usr/lib/python3.13/asyncio/runners.py\", line 118, in run\n return self._loop.run_until_complete(task)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"/usr/lib/python3.13/asyncio/base_events.py\", line 725, in run_until_complete\n return future.result()\n ~~~~~~~~~~~~~^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/asyncclick/core.py\", line 1443, in main\n rv = await self.invoke(ctx)\n ^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cli/common.py\", line 270, in invoke\n _handle_exception(self._debug, exc)\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cli/common.py\", line 268, in invoke\n return await super().invoke(ctx)\n ^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/asyncclick/core.py\", line 1953, in invoke\n await super().invoke(ctx)\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/asyncclick/core.py\", line 1306, in invoke\n return await ctx.invoke(self.callback, **ctx.params)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/asyncclick/core.py\", line 873, in invoke\n rv = await rv\n ^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cli/main.py\", line 370, in cli\n await dev.update()\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/iot/iotdevice.py\", line 326, in update\n await module._post_update_hook()\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/iot/modules/time.py\", line 28, in _post_update_hook\n self._timezone = await get_timezone(res.get(\"index\"))\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/iot/iottimezone.py\", line 24, in get_timezone\n return await CachedZoneInfo.get_cached_zone_info(name)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cachedzoneinfo.py\", line 20, in get_cached_zone_info\n zinfo = await loop.run_in_executor(None, _get_zone_info, time_zone_str)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/usr/lib/python3.13/concurrent/futures/thread.py\", line 59, in run\n result = self.fn(*self.args, **self.kwargs)\n File \"/root/.local/share/pipx/venvs/python-kasa/lib/python3.13/site-packages/kasa/cachedzoneinfo.py\", line 27, in _get_zone_info\n return ZoneInfo(time_zone_str)\n File \"/usr/lib/python3.13/zoneinfo/_common.py\", line 24, in load_tzdata\n raise ZoneInfoNotFoundError(f\"No time zone found with key {key}\")\nzoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key MST7MDT'","author":{"url":"https://github.com/KF0ILP","@type":"Person","name":"KF0ILP"},"datePublished":"2025-12-06T13:40:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/1620/python-kasa/issues/1620"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c2b4eb58-1770-b8d7-ffd4-2ad31d9b0b9f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E054:2E32E2:26184B4:33841D3:6981CA37 |
| html-safe-nonce | 62d39b914b588218a84a5fd2a1de972a79a29eccb04d61a18950593aebf363c6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDU0OjJFMzJFMjoyNjE4NEI0OjMzODQxRDM6Njk4MUNBMzciLCJ2aXNpdG9yX2lkIjoiMjUyODQ5NjUxNjQ5NTE2NjAwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5857c14720e05f6195d7f32a19b15e40f847c5e856beae3802dafcd336a09c98 |
| hovercard-subject-tag | issue:3701731511 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-kasa/python-kasa/1620/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f3cea3d36810683fcd6b321173d52bf04deb8392a5baeb6ffa73f655f392a87e/python-kasa/python-kasa/issues/1620 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f3cea3d36810683fcd6b321173d52bf04deb8392a5baeb6ffa73f655f392a87e/python-kasa/python-kasa/issues/1620 |
| og:image:alt | I had to install pipx to get kasa to install on my OS. Bottom line Issue: ZoneInfoNotFoundError(f"No time zone found with key {key}") zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found wit... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KF0ILP |
| hostname | github.com |
| expected-hostname | github.com |
| None | 95dd6eb30a064b87bd2c653e622fe2eb6a2ec1d12751c5463c252220548e75a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-kasa/python-kasa git https://github.com/python-kasa/python-kasa.git |
| octolytics-dimension-user_id | 57733869 |
| octolytics-dimension-user_login | python-kasa |
| octolytics-dimension-repository_id | 221571611 |
| octolytics-dimension-repository_nwo | python-kasa/python-kasa |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 221571611 |
| octolytics-dimension-repository_network_root_nwo | python-kasa/python-kasa |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7f9fe298cbc605034955dde47054b68dbf531efd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width