Name of the enforced locale (en_US.UTF-8) is adjusted to work on macOS.

This commit is contained in:
Alex Kirhenshtein 2020-08-24 17:04:26 +03:00 • committed by sigma67
commit 6a979ad9c2
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0

View file

@ -81,7 +81,7 @@ class YTMusic(BrowsingMixin, WatchMixin, LibraryMixin, PlaylistsMixin, UploadsMi
locale.setlocale(locale.LC_ALL, language)
except locale.Error:
with suppress(locale.Error):
locale.setlocale(locale.LC_ALL, 'en_US.UTF8')
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
self.lang = gettext.translation('base',
localedir=pkg_resources.resource_filename(
'ytmusicapi', 'locales'),