ZeroDivisionErrorfloat division

Chitlesh GOORAH chitlesh at fedoraproject.org
Sat Mar 18 13:16:49 UTC 2006


Hello there,
Ive encountered a ZeroDivisionErrorfloat division error while
performing a diff on the wiki page:
http://fedoraproject.org/wiki/Kadischi/Schedule?action=diff&rev2=18&rev1=17

Maybe it might interest you guys on Fedora-Website

==============================================================
Differences between revisions 17 and 18
--> -->


ZeroDivisionErrorfloat division	Please include this information in
your bug reports!:
Python Python 2.2.3: /usr/bin/python
Linux fedora.linux.duke.edu 2.4.21-32.0.1.ELsmp #1 SMP Wed May 25
14:26:33 EDT 2005 i686
MoinMoin Release 1.3.4 [Revision 1.3.4 release]
Sat Mar 18 08:13:39 2006

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.2/site-packages/MoinMoin/request.py in
run(self=<MoinMoin.request.RequestCGI instance>)
  916             else:
  917                 try:
  918                     cgitb.Hook(file=self).handle(saved_exc)
  919                     # was: cgitb.handler()
  920                 except:
cgitb = <module 'MoinMoin.support.cgitb' from
'/usr/lib/python2.2/site-packages/MoinMoin/support/cgitb.pyc'>,
cgitb.Hook = <class MoinMoin.support.cgitb.Hook>, file undefined, self
= <MoinMoin.request.RequestCGI instance>, ).handle undefined,
saved_exc = (<class exceptions.ZeroDivisionError>,
<exceptions.ZeroDivisionError instance>, <traceback object>)

 /usr/lib/python2.2/site-packages/MoinMoin/wikiaction.py in
do_diff(pagename=u'Kadischi/Schedule',
request=<MoinMoin.request.RequestCGI instance>)
  162     if request.user.show_fancy_diff:
  163         from MoinMoin.util.diff import diff
  164         request.write(diff(request, oldpage.get_raw_body(),
newpage.get_raw_body()))
  165         newpage.send_page(request, count_hit=0, content_only=1,
content_id="content-below-diff")
  166     else:
request = <MoinMoin.request.RequestCGI instance>, request.write =
<bound method RequestCGI.write of <MoinMoin.request.RequestCGI
instance>>, diff = <function diff>, oldpage = <MoinMoin.Page.Page
instance>, oldpage.get_raw_body = <bound method Page.get_raw_body of
<MoinMoin.Page.Page instance>>, newpage = <MoinMoin.Page.Page
instance>, newpage.get_raw_body = <bound method Page.get_raw_body of
<MoinMoin.Page.Page instance>>

 /usr/lib/python2.2/site-packages/MoinMoin/util/diff.py in
diff(request=<MoinMoin.request.RequestCGI instance>,
old=u'||||||<tablestyle="width: 100% ;color: white;
ba...kground-color: #3074c2">||\n----\nCategoryKadischi\n',
new=u'||||||<tablestyle="width: 100% ;color: white;
ba...kground-color: #3074c2">||\n----\nCategoryKadischi\n')
   94         charmatch = charobj.get_matching_blocks()
   95
   96         if charobj.ratio() < 0.5:
   97             # Insufficient similarity.
   98             if leftpane:
charobj = <difflib.SequenceMatcher instance>, charobj.ratio = <bound
method SequenceMatcher.ratio of <difflib.SequenceMatcher instance>>

 /usr/lib/python2.2/difflib.py in ratio(self=<difflib.SequenceMatcher instance>)
  526         matches = reduce(lambda sum, triple: sum + triple[-1],
  527                          self.get_matching_blocks(), 0)
  528         return 2.0 * matches / (len(self.a) + len(self.b))
  529
  530     def quick_ratio(self):
matches = 0, len undefined, self = <difflib.SequenceMatcher instance>,
self.a = u'', self.b = ''

ZeroDivisionError: float division
      __doc__ = 'Second argument to a division or modulo operation was zero.'
      __getitem__ = <bound method ZeroDivisionError.__getitem__ of
<exceptions.ZeroDivisionError instance>>
      __init__ = <bound method ZeroDivisionError.__init__ of
<exceptions.ZeroDivisionError instance>>
      __module__ = 'exceptions'
      __str__ = <bound method ZeroDivisionError.__str__ of
<exceptions.ZeroDivisionError instance>>
      args = ('float division',)
=================================================================

Chitlesh
--
http://clunixchit.blogspot.com




More information about the Fedora-websites-list mailing list