On Friday 29 September 2006 21:52, Darryl Cousins wrote: > File "/opt/zope/zope3/src/zope/schema/vocabulary.py", line 41, in > __init__ > self.token = str(token) > UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in > position 13: ordinal not in range(128)with vocabulary code: > > I can't figure out how to get the correct unicode value into the utility > list and yet still have str(u'Ã©') work when vocabulary factory is > called.
The token of a vocabulary term *cannot* be a unicode string and must be ASCII. In your scenario the default term implementation will not work and you have to provide your own, somehow escaping the value to an ASCII string. Note that this requirement is well-documented in the interfaces of the vocabulary. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training _______________________________________________ Zope3-users mailing list Zope3email@example.com http://mail.zope.org/mailman/listinfo/zope3-users