Commit a20c1fe4 authored by Kliment Yanev's avatar Kliment Yanev

POtential fix for wx unicode decode errors

parent d73709ff
......@@ -91,7 +91,7 @@ class printcore():
self.clear=True
time.sleep(1.0)
if (not self.online and not self.printing):
self._send("M105")
self._send("M105")
while(True):
if(not self.printer or not self.printer.isOpen):
break
......@@ -221,7 +221,7 @@ class printcore():
def send_now(self,command,wait=0):
"""Sends a command to the printer ahead of the command queue, without a checksum
"""
if(self.online):
if(self.online or force):
if(self.printing):
self.priqueue+=[command]
else:
......
......@@ -74,7 +74,10 @@ class Tee(object):
def __del__(self):
sys.stdout = self.stdout
def write(self, data):
self.target(data)
try:
self.target(data)
except:
pass
self.stdout.write(data.encode("utf-8"))
def flush(self):
self.stdout.flush()
......@@ -1546,7 +1549,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
print pronsole.totalelength(self.f), _("mm of filament used in this print\n")
print _("the print goes from %f mm to %f mm in X\nand is %f mm wide\n") % (Xmin, Xmax, Xtot)
if webavail:
self.webInterface.AddLog("the print goes from %f mm to %f mm in X\nand is %f mm wide\n") % (Xmin, Xmax, Xtot)
self.webInterface.AddLog(_("the print goes from %f mm to %f mm in X\nand is %f mm wide\n") % (Xmin, Xmax, Xtot))
print _("the print goes from %f mm to %f mm in Y\nand is %f mm wide\n") % (Ymin, Ymax, Ytot)
print _("the print goes from %f mm to %f mm in Z\nand is %f mm high\n") % (Zmin, Zmax, Ztot)
print _("Estimated duration (pessimistic): "), pronsole.estimate_duration(self.f)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment