From 7e316340726fa2baed4b6319f9390bf5547f3d8f Mon Sep 17 00:00:00 2001 From: micbou Date: Wed, 8 Mar 2017 17:30:00 +0100 Subject: [PATCH] Convert stderr from server to unicode On Python 3, reading stderr from server returns bytes. We need to convert it to unicode for splitlines. --- python/ycm/youcompleteme.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ycm/youcompleteme.py b/python/ycm/youcompleteme.py index 2a2fe138..3fa33846 100644 --- a/python/ycm/youcompleteme.py +++ b/python/ycm/youcompleteme.py @@ -242,7 +242,8 @@ class YouCompleteMe( object ): else: error_message = EXIT_CODE_UNEXPECTED_MESSAGE.format( code = return_code ) - server_stderr = '\n'.join( self._server_popen.stderr.read().splitlines() ) + server_stderr = '\n'.join( + utils.ToUnicode( self._server_popen.stderr.read() ).splitlines() ) if server_stderr: self._logger.error( server_stderr )