andyli / pyextern

Extern generator for the Haxe Python target.
The Unlicense
61 stars 8 forks source link

getting error while creating extern #3

Closed MatthijsKamstra closed 8 years ago

MatthijsKamstra commented 8 years ago

I wanted to create externs for Flask. That failed, so I tried something you already did (docutils)

And I got this error

pip3 install docutils
python3 Main.py docutils out
Traceback (most recent call last):
  File "Main.py", line 11, in <module>
    from docutils.frontend import OptionParser as docutils_frontend_OptionParser
  File "/usr/local/lib/python3.5/site-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/usr/local/lib/python3.5/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/local/lib/python3.5/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/local/lib/python3.5/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/locale.py", line 577, in getlocale
    return _parse_localename(localename)
  File "/usr/local/Cellar/python3/3.5.2_1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/locale.py", line 486, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8
andyli commented 8 years ago

Try this: https://coderwall.com/p/-k_93g/mac-os-x-valueerror-unknown-locale-utf-8-in-python

Look like it is a pretty old Python/OSX issue and seems no one want to do something with it...

MatthijsKamstra commented 8 years ago

that worked! thx