In some cases locale.getdefaultlocale() returns (None, None) causing fdroid to crash.
locale.getdefaultlocale()
(None, None)