Bug 28760 - Inkscape gcodetools plugin needs patch from upstream to fix fill area bug
Summary: Inkscape gcodetools plugin needs patch from upstream to fix fill area bug
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 8
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: QA Team
QA Contact:
URL: https://gitlab.com/inkscape/extension...
Whiteboard: MGA8-64-OK
Keywords: advisory, validated_update
Depends on:
Blocks:
 
Reported: 2021-04-11 12:08 CEST by Mika Laitio
Modified: 2023-07-09 20:57 CEST (History)
3 users (show)

See Also:
Source RPM: inkscape-1.0.2-1.mga8.src.rpm
CVE:
Status comment:


Attachments

Description Mika Laitio 2021-04-11 12:08:04 CEST
Description of problem:

Inkscapes tool in menu/extensions/gcodetools/Area will fail in a way described in https://gitlab.com/inkscape/extensions/-/issues/296

The fix has been applied at least to inkscape master branch for upcoming 1.1 but it works also with Mageia's 1.0.2 version. Fix refereed in upstream bug issue 296 is available in 

https://gitlab.com/inkscape/extensions/-/commit/07adfd6d2e8eaf7cbb478d838d8d3a83cccc3e25.diff 

I have myself patched the gcodetools.py manually and tested it to work.

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


How reproducible:


Steps to Reproduce:
1. Create some Text with inkscape with big font ("Hello" for example)
2. Select created text
3. Select Menu Extensions/GCodeTools/Orientations points and press apply and then close the dialog
4. Select Menu Extensions/GCodeTools/Tools Library, select Cylinder and press apply and then close the dialog
5. Select Menu Extensions/GCodeTools/Area and press apply... Error will popup due to python exception "TypeError: Argument must be bytes or unicode, got 'Style'"
just like in upstream bug 296 that has been fixed.
Comment 1 Lewis Smith 2021-04-12 10:17:41 CEST
Thank you for this helpful report, the research, and testing the fix.

Trying this on M8 LXDE inkscape-1.0.2-1.mga8
1. Created big text
2. Selected it all  (within the Text tool, not as an object)
3. Did all that, but it complained on applying:
"This extension works with Paths and Dynamic Offsets and groups of them only! All other objects will be ignored!
Solution 1: press Path->Object to path or Shift+Ctrl+C.
Solution 2: Path->Dynamic offset or Ctrl+J.
Solution 3: export all contours to PostScript level 2 (File->Save As->.ps) and File->Import this file."

Gave up, started again:
1. Created big text.
2. With that *object* selected, converted it to path.
3. Did that.
4. Did that.
5. Did that, and got the bug:
"Traceback (most recent call last):
  File "gcodetools.py", line 5921, in <module>
    Gcodetools().run()
  File "/usr/share/inkscape/extensions/inkex/base.py", line 140, in run
    self.save_raw(self.effect())
  File "gcodetools.py", line 5872, in effect
    self.options.active_tab()
  File "gcodetools.py", line 4164, in tab_area
    elem = area_group.add(PathElement(style=MARKER_STYLE["biarc_style_i"]['area']))
  File "src/lxml/classlookup.pxi", line 77, in lxml.etree.ElementBase.__init__
  File "src/lxml/apihelpers.pxi", line 158, in lxml.etree._initNewElement
  File "src/lxml/apihelpers.pxi", line 317, in lxml.etree._initNodeAttributes
  File "src/lxml/apihelpers.pxi", line 334, in lxml.etree._addAttributeToNode
  File "src/lxml/apihelpers.pxi", line 1538, in lxml.etree._utf8
TypeError: Argument must be bytes or unicode, got 'Style'"
---
Inkscape is committed by different people, so assigning this bug globally. It looks easy to fix with Mika's references.

Assignee: bugsquad => pkg-bugs
Summary: gcodetools plugin needs patch from upstream to fix fill area bug => Inkscape gcodetools plugin needs patch from upstream to fix fill area bug

Comment 2 David GEIGER 2021-04-12 16:48:26 CEST
Should be fixed with inkscape-1.0.2-1.1.mga8 in Core/Updates_testing repo!

CC: (none) => geiger.david68210

Comment 3 David GEIGER 2021-04-12 17:07:48 CEST
Assigning to QA,


Advisory:
========================

This update added an upstream patch to update gcodetools.py to fix a bug with area creation where a conversion to string no longer worked in Inkscape 1.0 and changed an indentation so that the 'd' parameter is correctly exported for dynamic offsets.

Reference:
https://gitlab.com/inkscape/extensions/-/issues/296

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

Packages in 8/core/updates_testing:
========================
inkscape-1.0.2-1.1.mga8.i586.rpm
inkscape-1.0.2-1.1.mga8.x86_64.rpm


Source RPM: 
========================
inkscape-1.0.2-1.1.mga8.src.rpm

Assignee: pkg-bugs => qa-bugs

Comment 4 Aurelien Oudelet 2021-04-15 18:17:41 CEST
Yep.
Validating.

Keywords: (none) => advisory, validated_update
CC: (none) => ouaurelien, sysadmin-bugs
Whiteboard: (none) => MGA8-64-OK

Comment 5 Mageia Robot 2021-04-15 21:06:10 CEST
An update for this issue has been pushed to the Mageia Updates repository.

https://advisories.mageia.org/MGAA-2021-0084.html

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 6 jendy henna 2022-12-30 03:39:10 CET Comment hidden (spam)

CC: (none) => hanajendi8

Comment 7 guru guri 2023-07-09 20:50:14 CEST Comment hidden (spam)

CC: (none) => iverrpro1

sturmvogel 2023-07-09 20:57:41 CEST

CC: hanajendi8, iverrpro1 => (none)


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