'Measure Path' extension fails if <svg> width, height use unit identifier

Bug #1395567 reported by su_v on 2014-11-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Medium
Alvin Penner

Bug Description

Affects trunk <lp:inkscape> and 0.91 <lp:inkscape/0.91.x>

Steps to reproduce:
1) launch inkscape with default (new) prefs, default new doc (locale: en_US)
2) draw a path (e.g. a straight line across the page)
3) measure the path with 'Extensions > Visualize Path > Measure Path'
   (default settings)

Expected result:
Extension processes the selected path and adds the computed length as 'text-on-path' to the line.

Actual result:
Extension fails with an error:

Traceback (most recent call last):
  File "measure.py", line 266, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 268, in affect
    self.effect()
  File "measure.py", line 186, in effect
    factor = float(doc.get('width'))/float(vieww)
ValueError: invalid literal for float(): 210mm

The templates have been reworked on both trunk and 0.91.x and now use a unit identifier for the width, height attributes of the <svg> root element (e.g. the A4 page used in default templates are defined in mm).

su_v (suv-lp) on 2014-11-24
summary: - 'Measure Path' extension fails if svg width / height use unit identifier
+ 'Measure Path' extension fails if <svg> width, height use unit
+ identifier
Alvin Penner (apenner) wrote :

fix committed to rev 13778

Changed in inkscape:
status: New → Fix Committed
su_v (suv-lp) on 2014-11-29
Changed in inkscape:
assignee: nobody → Alvin Penner (apenner)
milestone: 0.91 → 0.92
tags: added: backport-proposed
ScislaC (scislac) wrote :

Backported in 0.91.x r13703.

Changed in inkscape:
milestone: 0.92 → 0.91
su_v (suv-lp) on 2015-01-16
tags: removed: backport-proposed
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