-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyde gen -r fails with locale.Error: unsupported locale setting #1
Comments
>>> import itertools, locale
>>> list(itertools.ifilter(lambda l: l == 'en' or l == 'ru', locale.locale_alias.keys()))
['en', 'ru']
>>> list(itertools.ifilter(lambda l: l.startswith('en') or l.startswith('ru'), locale.locale_alias.keys()))
[
'english_united-states', 'en_gb@euro', 'english_us.ascii', 'ru_ua.koi8u',
'ru_ua.microsoftcp1251', 'rumanian', 'ru.koi8r', 'en_au', 'en_za.iso88591',
'en_hk', 'en_us.885915', 'en_us.iso885915@euro', 'en_sg', 'en_za', 'en_zw',
'en_us@euro', 'en_sg.iso88591', 'en_ie', 'en_in', 'ru_ru.koi8r', 'en_ie@euro',
'en_be', 'en_bw', 'en_uk', 'en_us', 'en_us@euro@euro', 'ru_ru.cp1251',
'en_gb.iso885915', 'eng_gb', 'en_ca', 'en_za@euro', 'russian', 'english_us.8859',
'en_hk.iso88591', 'en_gb.88591', 'en_ie.utf8@euro', 'ru_ua.cp1251', 'en_za.iso885915',
'eng_gb.8859', 'en_us.iso88591', 'en.iso88591', 'en', 'english.iso88591', 'en_ph.iso88591',
'en_ph', 'en_nz.iso88591', 'english_uk', 'english_us', 'en_ca.iso88591', 'ru_ru.microsoftcp1251',
'en_us.iso885915', 'en_za.88591', 'english_uk.8859', 'en_ie.iso88591', 'english_united-states.437',
'en_us.88591', 'en_zw.iso88591', 'en_gb.iso88591', 'en_ie.iso885915', 'en_gb', 'en_nz', 'english',
'en_bw.iso88591', 'ru_ru', 'ru_ua', 'ru_ru.iso88595', 'en_ie.iso885915@euro', 'en_au.iso88591',
'en_be@euro', 'ru'] What do you get? |
If you are on ubuntu, you can also try:
|
Anyways, I suspect the problem is you don't have |
I have the same output, I work on OSX here is my ~/.profile file export LANG="ru_RU.UTF-8"
export LC_COLLATE="ru_RU.UTF-8"
export LC_CTYPE="ru_RU.UTF-8"
export LC_MESSAGES="ru_RU.UTF-8"
export LC_MONETARY="ru_RU.UTF-8"
export LC_NUMERIC="ru_RU.UTF-8"
export LC_TIME="ru_RU.UTF-8"
export LC_ALL= |
I get the same error even if change ru to ru_ru and en to en_us in language and locale settings in *.yaml files |
The same thing, for a while I decided to stay with old configs to provide basic internationalization |
So, after you changed |
I meant |
Yes I've the same error, though I've a lot of other Django projects and they work just fine. |
hmm. I am really not sure what the issue is then.
|
On ubuntu 12.04, I needed to what does |
Playing in a python shell, it seems using a tuple for 2nd arg to setlocale breaks on OS X (10.6.8) system python (2.6.1). Calling |
I've fixed this error here is the fixes, just added some conditional statements def begin_text_resource(self, resource, text):
try:
lc = resource.meta.lc
self.default_locale = locale.getlocale()
if 'darwin' in sys.platform:
locale.setlocale(locale.LC_ALL, lc)
elif 'linux' in sys.platform:
locale.setlocale(locale.LC_ALL, (lc, resource.meta.encoding))
self.template.env.install_gettext_translations(self.translations[lc], newstyle=True)
except AttributeError:
pass
return text And now I have the error like Traceback (most recent call last):
File "/Users/sultan/.virtualenvs/e/bin/hyde", line 8, in <module>
load_entry_point('hyde==0.8.5a15', 'console_scripts', 'hyde')()
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/main.py", line 10, in main
Engine().run()
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/engine.py", line 39, in run
super(Engine, self).run(args)
File "/Users/sultan/.virtualenvs/e/lib/python2.7/site-packages/commando.py", line 198, in run
args.run(self, args)
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/engine.py", line 118, in gen
gen.generate_all(incremental=incremental)
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/generator.py", line 205, in generate_all
self.__generate_node__(self.site.content, incremental)
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/generator.py", line 303, in __generate_node__
self.__generate_resource__(resource, incremental)
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/generator.py", line 324, in __generate_resource__
self.update_deps(resource)
File "/Users/sultan/.virtualenvs/e/src/hyde/hyde/generator.py", line 148, in update_deps
self.deps[rel_path] = deps
File "/Users/sultan/.virtualenvs/e/bin/../lib/python2.7/UserDict.py", line 24, in __setitem__
def __setitem__(self, key, item): self.data[key] = item
TypeError: 'NoneType' object does not support item assignment |
The text was updated successfully, but these errors were encountered: