跳至内容
菜单
此问题已终结
2 回复
5604 查看

Hello All, 

Here is my error when I try to start the openerp-server using " ./openerp-server " command on my Ubuntu 14.04 server, so could u please anyone help me? 

Thank You.

Traceback (most recent call last):
  File "./openerp-server", line 5, in <module>
    openerp.cli.main()
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/__init__.py", line 71, in main
    o.run(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 174, in run
    main(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/cli/server.py", line 139, in main
    openerp.tools.config.parse_config(args)
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/config.py", line 336, in parse_config
    openerp.netsvc.init_logger()
  File "/home/zone/openerp-8.0-29e08a2/openerp/netsvc.py", line 136, in init_logger
    resetlocale()
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1084, in resetlocale
    for ln in get_locales():
  File "/home/zone/openerp-8.0-29e08a2/openerp/tools/translate.py", line 1052, in get_locales
    lang = locale.getdefaultlocale()[0]
  File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

 

形象
丢弃
最佳答案

Madura, what is the output of locale command in your linux command line?

形象
丢弃
编写者

Hello John, here is my locale:________ locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE=UTF-8 LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=

Here's mine (also Ubuntu 14.04): LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US.UTF-8" LC_NUMERIC=en_GB.UTF-8 LC_TIME=en_GB.UTF-8 LC_COLLATE="en_US.UTF-8" LC_MONETARY=en_GB.UTF-8 LC_MESSAGES="en_US.UTF-8" LC_PAPER=en_GB.UTF-8 LC_NAME=en_GB.UTF-8 LC_ADDRESS=en_GB.UTF-8 LC_TELEPHONE=en_GB.UTF-8 LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=en_GB.UTF-8 LC_ALL= As you can see from the error message and compared to what I have, the LC_CTYPE has an incorrect value. This webpage described how you should rectify it: http://askubuntu.com/questions/33025/locale-settings-are-not-right-how-can-i-reset-them

Another way is to follow the instruction in this webpage: http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue (see answer from Otto Kekäläinen or Rinzwind)

编写者 最佳答案

I found a solution and it worked to me. The solution is given below.

sudo cp /etc/default/locale /etc/default/locale.BACKUP
sudo rm -rf /etc/default/locale

sudo su root -c "echo 'LC_ALL="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANG="en_US.UTF-8"' >> /etc/default/locale"
sudo su root -c "echo 'LANGUAGE="en_US:en"' >> /etc/default/locale"

 

形象
丢弃
相关帖文 回复 查看 活动
2
2月 23
7661
0
9月 20
3004
3
6月 24
1422
3
6月 24
6205
2
3月 24
2745