1

I have tried to install Odoo on my macOS. but when I tried to run odoo-bin file in the eclipse it gives me error as the ValueError: unknown locale: UTF-8. but using terminal it is working properly. I also tried but is not working for the eclipse.

sr/local/lib/python3.7/site-packages/psycopg2/__init__.py:144:      
 UserWarning: The psycopg2 wheel package will be renamed from release     2.8; in order to keep installing from binary please use "pip install  psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
  """)
Traceback (most recent call last):
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo-bin", line 8, in <module>
    odoo.cli.main()
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo/cli/command.py", line 60, in main
    o.run(args)
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo__WorkSpace/odoo_v12/odoo/odoo/cli/server.py", line 176, in run
    main(args)
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo__WorkSpace/odoo_v12/odoo/odoo/cli/server.py", line 124, in main
    odoo.tools.config.parse_config(args)
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo/tools/config.py", line 344, in parse_config
    odoo.netsvc.init_logger()
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo/netsvc.py", line 134, in init_logger
    resetlocale()
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo/tools/translate.py", line 1204, in resetlocale
    for ln in get_locales():
  File "/Users/harshittrivedi/Desktop/Odoo_Ec_Worksplace/Odoo_WorkSpace/odoo_v12/odoo/odoo/tools/translate.py", line 1173, in get_locales
    lang = locale.getdefaultlocale()[0]
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 568, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 495, in _parse_localename
    raise ValueError('unknown locale: %s' % localename)
ValueError: unknown locale: UTF-8

Tried with that also

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Harshit Trivedi
  • 764
  • 9
  • 33
  • @furas I added my traceback which show me in eclipse. – Harshit Trivedi Jul 14 '19 at 12:48
  • Have a look at this question: https://stackoverflow.com/questions/829749/launch-mac-eclipse-with-environment-variables-set – hmedia1 Jul 14 '19 at 13:18
  • Also this doc page: https://docs.python.org/3/library/locale.html – hmedia1 Jul 14 '19 at 13:18
  • From the latter, you'll see that by adding `import locale` and `locale.setlocale(locale.LC_ALL, '')`, it tells `python` to use your default locale specified by the $LANG environment variable – hmedia1 Jul 14 '19 at 13:21
  • If you need to, you can specify environment variables in the eclipse application launcher under the environment tab. Have a look [here](http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.pde.doc.user%2Fguide%2Ftools%2Flaunchers%2Fenvironment.htm) – hmedia1 Jul 14 '19 at 13:24

0 Answers0