nigelsmall/py2neo — pull request #222 by johanlundberg (2013-12-12 09:48:36+00:00)
Title: Labels needs unicode support.

Trying to set a list if labels where labels are,
labels = ['inventory_item', u'FSÖ', 'BAS']
caused:

```
Traceback (most recent call last):
File "/home/lundberg/projects/deladryck/scripts/importer.py", line 62, in
item.set_labels(*labels)
File "/home/lundberg/projects/deladryck/env/local/lib/python2.7/site-packages/py2neo/neo4j.py", line 1718, in set_labels
labels = [str(label) for label in set(flatten(labels))]
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd6' in position 2: ordinal not in range(128)
```

Using unicode instead of str fixes this.