bebound / pixivd

Pixiv Downloader - Batch download pictures from Pixiv
MIT License
139 stars 17 forks source link

AttributeError: 'NoneType' object has no attribute 'lower' #20

Closed Yiyoki closed 4 years ago

Yiyoki commented 4 years ago

python3 pixiv.py Traceback (most recent call last): File "pixiv.py", line 38, in from api import PixivApi File "/Volumes/Storage/Pixiv/pixiv/api.py", line 13, in from i18n import i18n as _ File "/Volumes/Storage/Pixiv/pixiv/i18n.py", line 9, in t = gettext.translation('messages', os.path.join(current_path, "locale"), languages=languages) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/gettext.py", line 583, in translation mofiles = find(domain, localedir, languages, all=True) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/gettext.py", line 554, in find for nelang in _expand_lang(lang): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/gettext.py", line 213, in _expand_lang loc = locale.normalize(loc) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/locale.py", line 401, in normalize code = localename.lower() AttributeError: 'NoneType' object has no attribute 'lower'

bebound commented 4 years ago

What's the output of env | grep LC?

Yiyoki commented 4 years ago

What's the output of env | grep LC?

LC_CTYPE=UTF-8

bebound commented 4 years ago

Try to set locale to something like “en_US.UTF-8” and then use pivix

bebound commented 4 years ago

I can't reproduce this issue and I believe it's related to locale config. Reopen this if you still can't figure it out.