-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I installed roadmapper via pip and used some example code from the wiki to try out this package. However, I was blocked by the locale settings. When I try to run the script which uses roadmapper, I get the following error.
Traceback (most recent call last):
File "/home/felixs/GitHub/declarative-planning/roadmapper/roadmap.py", line 7, in <module>
roadmap.set_timeline(TimelineMode.MONTHLY, "2023-03-15", 8, timeline_locale="en_US")
File "/home/felixs/GitHub/declarative-planning/roadmapper/env/lib/python3.10/site-packages/roadmapper/roadmap.py", line 305, in set_timeline
self.timeline.set_draw_position(self.__painter)
File "/home/felixs/GitHub/declarative-planning/roadmapper/env/lib/python3.10/site-packages/roadmapper/timeline.py", line 143, in set_draw_position
self.set_locale(self.locale_name)
File "/home/felixs/GitHub/declarative-planning/roadmapper/env/lib/python3.10/site-packages/roadmapper/timeline.py", line 108, in set_locale
self.locale_settings = TimelineLocale(locale)
File "/home/felixs/GitHub/declarative-planning/roadmapper/env/lib/python3.10/site-packages/roadmapper/timelinelocale.py", line 84, in __init__
locale.setlocale(locale.LC_ALL, locale_name)
File "/usr/lib/python3.10/locale.py", line 620, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
If I print my locale settings in Python, I get the following settings: ('en_GB', 'UTF-8'). This equals to en_GB.utf8 on my system. roadmapper somehow requires en_US (without utf8). I managed to work around this issue by trying to set the locale settings in a Docker container manually to en_US (without utf8). I selected this setting from a very long list when I ran sudo dpkg-reconfigure locales.
It would be very nice to decouple roadmapper from the locale settings.
FYI: My OS is Ubuntu 22.04 and I performed the mentioned installation steps.
Edit: My Python version is 3.10.6.