@@ -212,7 +212,7 @@ def about(self, event="empty"):
212
212
heading .grid (row = 0 , column = 0 , columnspan = 2 , sticky = N + S + W + E )
213
213
version_label = Label (self .info , text = "Version:" , relief = RIDGE )
214
214
version_label .grid (row = 1 , column = 0 , sticky = N + S + W + E )
215
- version_val = Label (self .info , text = "3.0 " , relief = RIDGE )
215
+ version_val = Label (self .info , text = "3.1 " , relief = RIDGE )
216
216
version_val .grid (row = 1 , column = 1 , sticky = N + S + W + E )
217
217
dev_label = Label (self .info , text = "Developer:" , relief = RIDGE )
218
218
dev_label .grid (row = 2 , column = 0 , sticky = N + S + W + E )
@@ -593,7 +593,13 @@ def main(self):
593
593
c2 = b2 .get ((index + 1 ), 'Change in Open Interest' )
594
594
b3 = df .iloc [:, 1 ]
595
595
c3 = b3 .get ((index + 2 ), 'Change in Open Interest' )
596
+ if isinstance (c2 , str ):
597
+ c2 = 0
598
+ if isinstance (c3 , str ):
599
+ c3 = 0
596
600
self .call_sum = round ((c1 + c2 + c3 ) / 1000 , 1 )
601
+ if self .call_sum == - 0 :
602
+ self .call_sum = 0.0
597
603
self .call_boundary = round (c3 / 1000 , 1 )
598
604
599
605
o1 = a .iloc [:, 1 ]
@@ -606,21 +612,33 @@ def main(self):
606
612
self .p5 = o3 .get ((index + 4 ), 'Change in Open Interest' )
607
613
self .p6 = o3 .get ((index - 2 ), 'Change in Open Interest' )
608
614
self .p7 = o2 .get ((index - 2 ), 'Change in Open Interest' )
615
+ if isinstance (p2 , str ):
616
+ p2 = 0
617
+ if isinstance (p3 , str ):
618
+ p3 = 0
619
+ if isinstance (self .p4 , str ):
620
+ self .p4 = 0
621
+ if isinstance (self .p5 , str ):
622
+ self .p5 = 0
609
623
self .put_sum = round ((p1 + p2 + p3 ) / 1000 , 1 )
610
624
self .put_boundary = round (p1 / 1000 , 1 )
611
625
self .difference = round (self .call_sum - self .put_sum , 1 )
612
626
if self .p5 == 0 :
613
- self .call_itm = 0
627
+ self .call_itm = 0.0
614
628
else :
615
629
self .call_itm = round (self .p4 / self .p5 , 1 )
616
630
if self .call_itm == - 0 :
617
- self .call_itm = 0
631
+ self .call_itm = 0.0
632
+ if isinstance (self .p6 , str ):
633
+ self .p6 = 0
634
+ if isinstance (self .p7 , str ):
635
+ self .p7 = 0
618
636
if self .p7 == 0 :
619
- self .put_itm = 0
637
+ self .put_itm = 0.0
620
638
else :
621
639
self .put_itm = round (self .p6 / self .p7 , 1 )
622
640
if self .put_itm == - 0 :
623
- self .put_itm = 0
641
+ self .put_itm = 0.0
624
642
625
643
if self .stop :
626
644
return
0 commit comments