Use str.encode()/str.decode() instead of unicode(). May fix #8