Fix UnicodeEncodeError in render widget

* add future imports.