improved performance but no log tracking
This commit is contained in:
parent
75301ea325
commit
d0208cf5f9
406
stockTicker.py
406
stockTicker.py
@ -974,16 +974,16 @@ class StockTicker():
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
@ -1051,15 +1051,16 @@ class StockTicker():
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
self.blank = Image.new('RGB', (10, 32))
|
||||
@ -1133,16 +1134,16 @@ class StockTicker():
|
||||
|
||||
image_list.append(self.blank)
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
|
||||
@ -1227,15 +1228,16 @@ class StockTicker():
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
|
||||
@ -1307,29 +1309,31 @@ class StockTicker():
|
||||
image_list.append(new_im)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
image_list.append(midFrame)
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
|
||||
@ -1400,30 +1404,32 @@ class StockTicker():
|
||||
image_list.append(new_im)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
image_list.append(midFrame)
|
||||
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
self.blank = Image.new('RGB', (10, 32))
|
||||
@ -1495,16 +1501,16 @@ class StockTicker():
|
||||
|
||||
image_list.append(self.blank)
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
|
||||
@ -1582,15 +1588,16 @@ class StockTicker():
|
||||
image_list.append(self.blank)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
finalDisplayImage = self.stitchImage(image_list)
|
||||
|
||||
@ -1668,15 +1675,16 @@ class StockTicker():
|
||||
image_list.append(img)
|
||||
image_list.append(self.blank)
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
news_image = self.stitchImage(image_list)
|
||||
|
||||
return news_image
|
||||
@ -1757,15 +1765,16 @@ class StockTicker():
|
||||
image_list.append(img)
|
||||
image_list.append(blank)
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
news_image = self.stitchImage(image_list)
|
||||
|
||||
return news_image
|
||||
@ -1917,16 +1926,16 @@ class StockTicker():
|
||||
img = img.crop((0,0,x_offset ,32))
|
||||
imgs.append(img)
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
|
||||
@ -1986,16 +1995,16 @@ class StockTicker():
|
||||
img.paste(logo, (x_offset, 0))
|
||||
x_offset += logo.size[0] + 2
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
name_timage = self.textImage(team['name'], med_font, r = 255, g = 255, b = 0)
|
||||
@ -2027,16 +2036,16 @@ class StockTicker():
|
||||
img = img.crop((0,0,x_offset ,32))
|
||||
imgs.append(img)
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
return self.stitchImage(imgs)
|
||||
def convertTemp(self,temp, setting):
|
||||
if setting == 'kelvin':
|
||||
@ -2181,15 +2190,16 @@ class StockTicker():
|
||||
imgs.append(img)
|
||||
imgs.append(self.blank)
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
return self.stitchImage(imgs)
|
||||
|
||||
@ -2328,16 +2338,16 @@ class StockTicker():
|
||||
|
||||
image_list.append(img)
|
||||
except Exception as e:
|
||||
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
return self.stitchImage(image_list)
|
||||
|
||||
def getDailyWeatherImageAlt(self):
|
||||
@ -2681,15 +2691,16 @@ class StockTicker():
|
||||
imgs.append(self.blank)
|
||||
# add the image text
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
return self.stitchImage(imgs)
|
||||
|
||||
@ -2768,15 +2779,16 @@ class StockTicker():
|
||||
imgs.append(img)
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
return imgs
|
||||
|
||||
@ -2822,15 +2834,16 @@ class StockTicker():
|
||||
|
||||
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
#below code stitches title and GIF together
|
||||
@ -3007,15 +3020,16 @@ if __name__ == '__main__':
|
||||
msg = getInput()
|
||||
stock_ticker.process_msg(msg)
|
||||
except Exception as e:
|
||||
logf = open('log.txt', "a")
|
||||
exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
logf.write(str(e))
|
||||
logf.write('. file: ' + fname)
|
||||
logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
logf.write('. type: ' + str(exc_type))
|
||||
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
logf.close()
|
||||
pass
|
||||
# logf = open('log.txt', "a")
|
||||
# exc_type, exc_obj, exc_tb = sys.exc_info()
|
||||
# fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1]
|
||||
# logf.write(str(e))
|
||||
# logf.write('. file: ' + fname)
|
||||
# logf.write('. line: ' + str(exc_tb.tb_lineno))
|
||||
# logf.write('. type: ' + str(exc_type))
|
||||
# logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
|
||||
# logf.close()
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user