Extensions->Render->Layout->N-up layout fails

Bug #1277649 reported by Alvin Penner on 2014-02-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Medium
tbnorth

Bug Description

- Windows XP, Inkscape rev 12991, default preferences

I get the Python crash message:

Traceback (most recent call last):
  File "layout_nup.py", line 88, in <module>
    e.affect()
  File "C:\InkscapeBZR\inkscape\share\extensions\inkex.py", line 261, in affect
    self.effect()
  File "layout_nup.py", line 76, in effect
    show=showList,
  File "C:\InkscapeBZR\inkscape\share\extensions\layout_nup_pageframe.py", line 84, in GenerateNup
    pgEdge = map(sum,zip(pgMargin, pgPadding))
TypeError: zip argument #1 must support iteration

jazzynico (jazzynico) wrote :

Confirmed on Crunchbang Waldorf, Inkscape trunk revision 13005.

Changed in inkscape:
importance: Undecided → Medium
milestone: none → 0.91
status: New → Triaged
tags: added: extensions-plugins
jazzynico (jazzynico) wrote :

Very close to Bug #1258473.

The extensions uses a self.unittouu call in a function (expandTuple, in layout_nup_pageframe.py) that is not a method of the Nup class, and thus doesn't inherits from the inkex class.Effect.

su_v (suv-lp) on 2014-03-26
tags: added: regression
su_v (suv-lp) on 2014-11-06
Changed in inkscape:
milestone: 0.91 → 0.91.1
tbnorth (terry-n-brown) wrote :

(I wrote the original version of this extension)

The removal of the "static" version of unittouu() really broke the design of this extension, which was to have the SVG layout calculations in a separate, "inkscape free", file. But that separate file was importing inkex anyway, so it wasn't really independent of inkscape.

So, simplest solution, delete share/extensions/layout_nup_pageframe.py and move its two functions into the Nup Effect class in layout_nup.py, where unittouu() is easier to access.

The attached patch (on rev 14142) does that.

Alvin Penner (apenner) wrote :

thanks, Terry, fix committed to rev 14146

Changed in inkscape:
status: Triaged → Fix Committed
su_v (suv-lp) on 2015-05-11
Changed in inkscape:
assignee: nobody → tbnorth (terry-n-brown)
milestone: 0.91.1 → 0.92
tags: added: backport-proposed
su_v (suv-lp) wrote :

Follow-up report (more relevant to trunk, though at least the first part of that report could be triggered in 0.91 too if backported as is, depending on which template the current document is based):
* Bug #1453982 “page size changes unexpectedly when running extension Render->Layout->Nup layout, if using mm as document unit.”
  https://bugs.launchpad.net/inkscape/+bug/1453982

bybinhabr (barbaratostes) wrote :

I need N-up Layout! I'm getting this error message:

Traceback (most recent call last):
  File "layout_nup.py", line 88, in <module>
    e.affect()
  File "/usr/share/inkscape/extensions/inkex.py", line 268, in affect
    self.effect()
  File "layout_nup.py", line 76, in effect
    show=showList,
  File "/usr/share/inkscape/extensions/layout_nup_pageframe.py", line 84, in GenerateNup
    pgEdge = map(sum,zip(pgMargin, pgPadding))
TypeError: zip argument #1 must support iteration

Hachmann (marenhachmann) wrote :

@Barbara: This has been fixed, as explained (maybe a little unclearly...) in the question section.

su_v (suv-lp) wrote :

Fix backported to 0.91.x in rev 13794.

Changed in inkscape:
milestone: 0.92 → 0.91.1
tags: removed: backport-proposed
jazzynico (jazzynico) on 2017-01-22
Changed in inkscape:
milestone: 0.91.1 → 0.92
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