在 rdflib 命名空间中创建 unicode 项时出现 Unicode 解码错误
$ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from rdflib.graph import ConjunctiveGraph
>>> from rdflib import Namespace, BNode, Literal, RDF, URIRef
***>>> rdfsNS = Namespace("http://www.w3.org/2000/01/rdf-schema#")
>>> item = "Petra Němcová"
>>> i = rdfsNS[item]***
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/rdflib/namespace.py", line 88, in __getitem__
return self.term(key)
File "/usr/local/lib/python2.7/dist-packages/rdflib/namespace.py", line 85, in term
return URIRef(self + name)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 7: ordinal not in range(128)
请帮助解决这个问题。