Unable to set locale 'en': unsupported locale setting.

52 views
Skip to first unread message

Greg from Oz

unread,
Oct 24, 2025, 9:33:33 PM (9 days ago) Oct 24
to weewx-user
Hi,
I have spent a few days trying to work this out.
I might have to reinstall a fresh weewx system but I want to avoid that if possible.

What I have done is installed the fuzzy-archer skin and have that running (sort of) as it updates the website with the weather data but it comes up with this error.

Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: Evaluation of template /opt/weewx/weewx-data/skins/Bootstrap/history.html.tmpl failed.
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: **** Ignoring template /opt/weewx/weewx-data/skins/Bootstrap/history.html.tmpl
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: **** To debug, try inserting '#errorCatcher Echo' at top of template
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: Evaluation of template /opt/weewx/weewx-data/skins/Bootstrap/about.html.tmpl failed.
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: **** Ignoring template /opt/weewx/weewx-data/skins/Bootstrap/about.html.tmpl
Oct 25 12:21:58 moonbi weectl[19313]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'

I have tried to change the lang/en.conf file in the Bootstrap directory. Failed.
Change the locale on the server. Failed.
Added Environment=LANG=en_AU.utf8 to systemd weewx service. Failed.
Looked at weewx documentation. Tried a few things there. Failed.

I just cannot work out why it is doing this error.

I want to change menus on the web page but because of this locale problem it won't let me do that either.

Anyone have any ideas about this one?
Thanks in advance. I hope it is something simple.

Pablo Sanchez

unread,
Oct 24, 2025, 9:39:17 PM (9 days ago) Oct 24
to weewx...@googlegroups.com
Hi,

If it helps any, locale is a command.

On my openSUSE/Tumbleweed installation, we see that locale is installed in /usr/bin:

$ which locale 
/usr/bin/locale

I am going to guess that if you type which locale, the program is not installed.  If it is not, you will want to use your package manager to install it.

Cheers!
---
pablo

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/97f9e573-ee84-484d-9af3-ed71745e1d10n%40googlegroups.com.

Greg from Oz

unread,
Oct 24, 2025, 9:39:51 PM (9 days ago) Oct 24
to weewx-user
I forgot to say I am running weewx 5.2.0 in a venv environment.

Greg from Oz

unread,
Oct 24, 2025, 9:42:19 PM (9 days ago) Oct 24
to weewx-user
locale -a
C
C.utf8
en_AU.utf8
en_US.utf8
POSIX

No, it is there. It is probably not in the pip environment? I am not a programmer. :)

Pablo Sanchez

unread,
Oct 24, 2025, 9:49:19 PM (9 days ago) Oct 24
to weewx...@googlegroups.com
My bad.

Using GAI, it says that it may be due to python3 not having the locale library installed.

Try going to chatgpt.com and entering the error string: weewx.cheetahgenerator: **** Reason: cannot find 'locale'

Cheers!
---
pablo

--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.

Greg from Oz

unread,
Oct 24, 2025, 9:59:29 PM (9 days ago) Oct 24
to weewx-user
I just did:
pip install locales ( I was trying pip install locale (without the s))!!!!!!! Now it tells me when weewx starts I have a locale.

But I am still getting the same error. I have restarted weewx.
Changed lang/en.conf to use AU but still get the error.

Pablo Sanchez

unread,
Oct 24, 2025, 10:08:14 PM (9 days ago) Oct 24
to weewx...@googlegroups.com
After the install, please remember to recreate venv. ;)
---
pablo

Greg from Oz

unread,
Oct 24, 2025, 10:11:54 PM (9 days ago) Oct 24
to weewx-user
How do I do that?
I just did a quick search but it doesn't say how to recreate only to create venv.

Thanks

Pablo Sanchez

unread,
Oct 24, 2025, 10:23:59 PM (9 days ago) Oct 24
to weewx...@googlegroups.com
Assuming you followed the excellent documentation:

First, either delete or rename ~/weewx-venv 

Then: 

# Create the virtual environment
python3 -m venv ~/weewx-venv
---
pablo 

Greg Reive

unread,
Oct 24, 2025, 10:41:41 PM (9 days ago) Oct 24
to weewx...@googlegroups.com
But won't that remove weewx and all the pip installs including locale?


You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/wzPwi1gOQtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/19a192de6f0.2848.44b74f35a7a433c111dbfaee4cca1c2d%40hillsandlakes.com.


--
¯\_(ツ)_/¯

Greg from Oz

unread,
Oct 24, 2025, 11:18:10 PM (9 days ago) Oct 24
to weewx-user
Bit more info:
sudo journalctl -f | grep locale
Oct 25 14:03:15 moonbi weectl[39599]: DEBUG weewx.reportengine: Running generators for report 'StandardReport' in directory '/opt/weewx/weewx-data/skins/Bootstrap' with locale 'en_AU.UTF-8'
Oct 25 14:03:21 moonbi weectl[39599]: DEBUG user.historygenerator: locale: No historygenerator.py specific labels found
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: ERROR weewx.cheetahgenerator: **** Reason: cannot find 'locale'
Oct 25 14:03:22 moonbi weectl[39599]: DEBUG weewx.reportengine: Running generators for report 'SteelSeries' in directory '/opt/weewx/weewx-data/skins/ss' with locale 'en_AU.UTF-8'

Greg from Oz

unread,
Oct 25, 2025, 4:50:30 AM (8 days ago) Oct 25
to weewx-user
I ended up starting all over again and it seems to be working now.
It would be nice to know why it didn't work before.
Maybe it is  because I had so much old stuff in the set up?
Reply all
Reply to author
Forward
0 new messages