cclient / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

LookupError: unknown encoding: #222

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Python 2.7.5 (default, Dec 10 2013, 23:00:39) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os,sys
>>> sys.path.append('lib')
>>> import PyV8
>>> ctxt = PyV8.JSContext()
>>> ctxt = PyV8.JSContext('utf8')
>>> ctxt.enter()
>>> ctxt.eval("1+2")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
LookupError: unknown encoding: 

Original issue reported on code.google.com by waynele...@gmail.com on 14 Jan 2014 at 10:39

GoogleCodeExporter commented 8 years ago
please define your encoding at file header

#!/usr/bin/python
# -*- coding: utf-8 -*-

Original comment by flier...@gmail.com on 14 Jan 2014 at 10:47

GoogleCodeExporter commented 8 years ago
#!/usr/bin/python
# -*- coding: utf-8 -*-

the same err appear, the header did not work.

Original comment by waynele...@gmail.com on 14 Jan 2014 at 11:36

GoogleCodeExporter commented 8 years ago
sorry, but I can't reproduce it at all, what's your LANG and encoding setting?

Python 2.7.6 (default, Nov 13 2013, 10:04:01)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> sys.path.append('lib')
>>> import PyV8
>>> ctxt = PyV8.JSContext()
>>> ctxt = PyV8.JSContext('utf8')
>>> ctxt.enter()
>>> ctxt.eval("1+2")
3

$export
declare -x LANG="zh_CN.UTF-8"
declare -x LC_ALL="en_US.UTF-8"
declare -x LC_CTYPE="en_US.UTF-8"

Original comment by flier...@gmail.com on 16 Jan 2014 at 10:44

GoogleCodeExporter commented 8 years ago
i got the same error on CentOS 6.3 with BOOST_LIB_VERSION "1_41"

Python 2.7.9 (default, Jan  16 2015, 06:52:11) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyV8
>>> ctxt = PyV8.JSContext()
>>> ctxt.enter()
>>> ctxt.eval('1+2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
LookupError: unknown encoding: 
>>> 

i rebuild with python 2.6 on the same server, it works!

Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyV8
>>> ctxt = PyV8.JSContext()
>>> ctxt.enter()
>>> ctxt.eval('1+2')
3
>>> 

Original comment by rainhard.w@gmail.com on 9 Jan 2015 at 6:33

GoogleCodeExporter commented 8 years ago
i found sth wrong: libboost_python.so links to libpython2.6.so

Original comment by rainhard.w@gmail.com on 13 Jan 2015 at 7:03