The only time that write_string should fail is if the Python is completely braindead. Check for that condition and output a more accurate warning. See #3326 for details.