That's a bit tricky. ``repr(framenet.frames('Pred'))`` returns str because ``repr`` built-in function converts the result of ``__repr__`` to str. And this conversion is an issue, because it is performed implicitly using ``sys.getdefaultencoding()`` (which is often ascii) and this could fail if default encoding can't encode unicode string ``__repr__`` returns. Users don't call ``repr`` daily, but they could check objects in REPL - ``__repr__`` is also used for that, and the result of ``__repr__`` is also decoded using ``sys.getdefaultencoding`` in this case, but the correct encoding is ``sys.stdout.encoding``, so checking object in REPL could fail.

Why do you need those ``text_type`` calls anyway? Won't ``str`` work?