espeed / bulbs

A Python persistence framework for graph databases like Neo4j, OrientDB and Titan.
http://bulbflow.org
Other
622 stars 83 forks source link

[BUG] Index lookup exception with unicode strings #117

Closed kikohs closed 10 years ago

kikohs commented 10 years ago

Hello, I would like to do index lookup with unicode string. I have read the other previous issue with unicode value to create a node https://github.com/espeed/bulbs/issues/114

However if I try:

self.g.people.index.lookup(name=u'Aname M\xf6ller')

or:

self.g.people.index.lookup(name=u'Aname Müller'.encode('utf-8'))

I have exceptions.

Please help,

PS: I have the latest bulbs from git

Thanks

espeed commented 10 years ago

What server and DB are you using? What's the full error being returned?

kikohs commented 10 years ago

Neo4j server 1.9.5

resp = lookup(self.index_name,key,value)
File "/Users/kikohs/work/repos/bulbs/bulbs/neo4jserver/client.py", line 878, in lookup_vertex
path = build_path(index_path, vertex_path, index_name, key, value)
File "/Users/kikohs/work/repos/bulbs/bulbs/utils.py", line 150, in build_path
segments = [quote(u(to_string(segment)), safe='') for segment in args if segment is not None]
File "/Users/kikohs/work/envs/anaconda/python.app/Contents/lib/python2.7/urllib.py", line 1282, in quote
return ''.join(map(quoter, s))

KeyError: u'\xf6'
espeed commented 10 years ago

Is this fixed?

espeed commented 10 years ago

Presuming fixed.

espeed commented 10 years ago

This is fixed in Rexster too now.