Installation problem with Skymap

34 views
Skip to first unread message

LeaF

unread,
Jul 21, 2026, 11:50:31 AM (19 hours ago) Jul 21
to weewx-user
While trying to get Skymap installed I'm running into this error:

Traceback (most recent call last):

File "/usr/share/weewx/weectl.py", line 85, in <module>

main()

~~~~^^

File "/usr/share/weewx/weectl.py", line 74, in main

namespace.func(namespace)

~~~~~~~~~~~~~~^^^^^^^^^^^

File "/usr/share/weewx/weectllib/__init__.py", line 77, in dispatch

_do_dispatch(namespace)

~~~~~~~~~~~~^^^^^^^^^^^

File "/usr/share/weewx/weectllib/__init__.py", line 109, in _do_dispatch

namespace.action_func(config_dict, namespace)

~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/share/weewx/weectllib/report_cmd.py", line 93, in run_reports

weectllib.report_actions.run_reports(config_dict,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^

epoch=namespace.epoch,

^^^^^^^^^^^^^^^^^^^^^^

report_date=namespace.date, report_time=namespace.time,

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

reports=namespace.reports)

^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/usr/share/weewx/weectllib/report_actions.py", line 84, in run_reports

engine = weewx.engine.DummyEngine(config_dict)

File "/usr/share/weewx/weewx/engine.py", line 89, in __init__

self.loadServices(config_dict)

~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^

File "/usr/share/weewx/weewx/engine.py", line 157, in loadServices

obj = weeutil.weeutil.get_object(svc)(self, config_dict)

File "/etc/weewx/bin/user/skymapalmanac.py", line 2394, in __init__

alm_conf_dict['Texts'] = self.process_language(config_dict, alm_conf_dict.get('additional_localization_sources',['internal','Seasons']))

~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/etc/weewx/bin/user/skymapalmanac.py", line 2475, in process_language

SkymapService._update_localization_from_skin(conf, skin_root, source, lang)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "/etc/weewx/bin/user/skymapalmanac.py", line 2663, in _update_localization_from_skin

conf['moon_phase_new_moon'] = data.get('Almanac',dict()).get('moon_phases',[])[0]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^

IndexError: list index out of range

Both Skymap and Skyfield are the same version 0.6.  and installed via weectl

Per the instructions I've replaced the original celestial.inc with the new one, added almanac.html.tmpl and skymap.html.tmpl to the Seasons skin folder.  Restarted weewx and ran sudo weectl report run and the error is as show above.  

Any suggestions as to what needs to be done?  Other info needed?

Thanks for the help.

Karen K

unread,
Jul 21, 2026, 12:03:14 PM (19 hours ago) Jul 21
to weewx-user
LeaF schrieb am Dienstag, 21. Juli 2026 um 17:50:31 UTC+2:

File "/etc/weewx/bin/user/skymapalmanac.py", line 2663, in _update_localization_from_skin

conf['moon_phase_new_moon'] = data.get('Almanac',dict()).get('moon_phases',[])[0]


First, as a workaround, replace []  by ['xxx'] in line 2663 of  /etc/weewx/bin/user/skymapalmanac.py.

Then, to get the real reason: Which language do you use? What contains the [Almanac] section of the language file of the Seasons skin for. that language?

Radoslav Drdla

unread,
6:23 AM (30 minutes ago) 6:23 AM
to weewx-user
I was solving a similar problem yesterday, and in the end, AI Gemini helped:

"Why does this error occur in the configuration?
When WeeWX goes through templates (like Seasons or Belchertown), it loads their .conf files (e.g. skin.conf or weewx.conf).

In WeeWX, the Moon phases are defined by default in the [Texts] or [Almanac] section inside the language file of the given skin (e.g. /etc/weewx/skins/Seasons/lang/cz.conf or en.conf). If the [Almanac] section is missing or the key moon_phases = Nov, ... is not defined in it, the function data.get('Almanac', dict()).get('moon_phases', []) returns an empty array []."

After several fixes, we came to modify the code skymapalmanac.py, so that it ignores any missing strings and does not fall into an error. The edit fixes an error that appears on line 2663. I am attaching the edited and (for me) working file.

Dne úterý 21. července 2026 v 18:03:14 UTC+2 uživatel Karen K napsal:
skymapalmanac.py
Reply all
Reply to author
Forward
0 new messages