diff --git a/syncplay/client.py b/syncplay/client.py index 6250b45..772be2a 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -1341,7 +1341,7 @@ class UiManager(object): def showDebugMessage(self, message): if constants.DEBUG_MODE and message.rstrip(): - sys.stderr.write("{}{}\n".format(time.strftime(constants.UI_TIME_FORMAT, time.localtime()),message.rstrip())) + sys.stderr.write("{}{}\n".format(time.strftime(constants.UI_TIME_FORMAT, time.localtime()).decode('utf-8'),message.rstrip())) def showMessage(self, message, noPlayer=False, noTimestamp=False, secondaryOSD=False): if not noPlayer: self.showOSDMessage(message, duration=constants.OSD_DURATION, secondaryOSD=secondaryOSD) diff --git a/syncplay/ui/consoleUI.py b/syncplay/ui/consoleUI.py index d5af043..868a43a 100644 --- a/syncplay/ui/consoleUI.py +++ b/syncplay/ui/consoleUI.py @@ -94,7 +94,7 @@ class ConsoleUI(threading.Thread): if noTimestamp: print(message) else: - print(time.strftime(constants.UI_TIME_FORMAT, time.localtime()) + message) + print(time.strftime(constants.UI_TIME_FORMAT, time.localtime()).decode('utf-8') + message) def showDebugMessage(self, message): print(message) diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 0aa6730..4250d6f 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -349,7 +349,7 @@ class MainWindow(QtGui.QMainWindow): if noTimestamp: self.newMessage(u"{}
".format(message)) else: - self.newMessage(time.strftime(constants.UI_TIME_FORMAT, time.localtime()) + message + u"
") + self.newMessage(time.strftime(constants.UI_TIME_FORMAT, time.localtime()).decode('utf-8') + message + u"
") @needsClient def getFileSwitchState(self, filename): @@ -370,7 +370,7 @@ class MainWindow(QtGui.QMainWindow): @needsClient def isItemUntrusted(self, filename): return isURL(filename) and not self._syncplayClient.isURITrusted(filename) - + @needsClient def isFileAvailable(self, filename): if filename: @@ -681,7 +681,7 @@ class MainWindow(QtGui.QMainWindow): message = message.replace(u"&", u"&").replace(u'"', u""").replace(u"<", u"<").replace(u">", u">") message = message.replace(u"\n", u"
") message = u"".format(constants.STYLE_ERRORNOTIFICATION) + message + u"" - self.newMessage(time.strftime(constants.UI_TIME_FORMAT, time.localtime()) + message + u"
") + self.newMessage(time.strftime(constants.UI_TIME_FORMAT, time.localtime()).decode('utf-8') + message + u"
") @needsClient def joinRoom(self, room=None):