Bug 185828 - ZeroDivisionErrorfloat division
Summary: ZeroDivisionErrorfloat division
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora Infrastructure
Classification: Retired
Component: website
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Greg DeKoenigsberg
QA Contact: Elliot Lee
URL: http://fedoraproject.org/wiki/Kadisch...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-03-18 23:40 UTC by Chitlesh GOORAH
Modified: 2007-04-18 17:40 UTC (History)
1 user (show)

Fixed In Version: 20060930
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-10-01 03:36:52 UTC
Embargoed:


Attachments (Terms of Use)

Description Chitlesh GOORAH 2006-03-18 23:40:05 UTC
Description of problem:
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

Version-Release number of selected component (if applicable):


How reproducible:
Everytime

Steps to Reproduce:
1.http://fedoraproject.org/wiki/Kadischi/Schedule
2. click on getinfo
3. request a difference between 17 and 18
  
Actual results:
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',)

Expected results:
It should show the difference of revision 17 and 18

Additional info:

Comment 1 Patrick Barnes 2006-10-01 03:36:52 UTC
This bug seems to have inadvertently been corrected by work done over the past 
few months.

I'm closing this bug as CURRENTRELEASE.  Thanks for pointing this out.


Note You need to log in before you can comment on or make changes to this bug.