Iwe run into another problem with the range class.
Seems same as user Mrpete had previously.
When i run the Range class block there are no errors.
but when i try to display bob i get this
Code:
E:\Programmer\Ipython\lib\site-packages\IPython\core\formatters.py:239: FormatterWarning: Exception in image/svg+xml formatter: unsupported operand type(s) for +=: 'float' and 'NoneType'
FormatterWarning,
<__main__.Range instance at 0x05B480A8>
I tryed to debug by running this block
Wich result in the same problem as Mrpete had ( i dont know if his problems was solved ?)
Code:
TypeError Traceback (most recent call last)
<ipython-input-50-301a190942bb> in <module>()
----> 1 bob._repr_svg_()
<ipython-input-48-bd9a4511d63f> in _repr_svg_(self)
131 for i in range(numRanks):
132 for j in range(numRanks):
--> 133 frac = self.getAmbigFrac(ranks[i], ranks[j], i > j)
134 hexcolor = '#%02x%02x%02x' % (255*(1-frac), 255, 255*(1-frac))
135 result += '<rect x="' + str(i*20) + '" y="' + str(j*20) + '" width="20" height="20" fill="' + hexcolor+'"></rect>'
<ipython-input-48-bd9a4511d63f> in getAmbigFrac(self, rank1, rank2, suited)
124 continue
125 nHand += 1 # short for nHand = nHand +1
--> 126 nFrac += self.getFrac(pe.string2card([card1,card2]))
127 return nFrac / nHand
128
TypeError: unsupported operand type(s) for +=: 'float' and 'NoneType'
Been staring at the code for like 2 hours without any progress.
Is it posibel to get a litle more help, becase im sorta hit a dead end here.
Last edited by klondi; 08-07-2014 at 08:36 PM.