function plotter get an zero division error

Bug #1064863 reported by uwesch on 2012-10-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
Alvin Penner

Bug Description

Extension --> Render --> function plotter in tab Range and sampling.

If the Start X value is the same like End X value the program gets an zero divison error. Fortunately the program don't crash.

===================================

Traceback (most recent call last):
  File "funcplot.py", line 298, in <module>
    e.affect()
  File "D:\Download\Inkscape_builds\inkscape\share\extensions\inkex.py", line 262, in affect
    self.effect()
  File "funcplot.py", line 278, in effect
    self.options.endpts)))
  File "funcplot.py", line 46, in drawfunction
   scalex = width / (xend - xstart)
ZeroDivisionError: float division

====================================

su_v (suv-lp) wrote :

Reproduced with Inkscape 0.48.3.1 and 0.48+devel r11772 on OS X 10.7.4

Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Alvin Penner (apenner) wrote :

attached is a modified version of funcplot.py. It can be tested by copying it into the folder \share\extensions\. It will raise a warning message if either the x- or y- intervals are zero.

since this contains new text and since we are in frost and translations are being committed, I won't do anything with this until receiving approval to go ahead.

uwesch (uwesch) wrote :

the file is working, Thank you Alvin.

Could I translate the sentence to Germany or is the warning message coded in the py file?

jazzynico (jazzynico) wrote :

@Alvin - Strings can be changed until we reach hard freeze (November 23, 2012). Feel free to commit now.

@Uwe - The error message is coded in the extension, and will be available for translation as soon as the python file is in the trunk and the inkscape.pot file is updated.

Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: none → 0.49
status: Confirmed → In Progress
Alvin Penner (apenner) wrote :

thanks, committed to rev 11824

Changed in inkscape:
status: In Progress → Fix Committed
Bryce Harrington (bryce) on 2015-02-23
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments