JJRobots COMMUNITY
layers - Printable Version

+- JJRobots COMMUNITY (http://forums.jjrobots.com)
+-- Forum: JJrobots (/forumdisplay.php?fid=1)
+--- Forum: Sphere-O-Bot (/forumdisplay.php?fid=37)
+--- Thread: layers (/showthread.php?tid=1950)



layers - justinpogge - 04-12-2019 05:57 PM

i cannot get eggbot to plot layers, i just get an error that reads:

Traceback (most recent call last):
File "eggbot.py", line 1406, in <module>
e.affect()
File "C:\Program Files (x86)\Inkscape\share\extensions/inkex.py", line 283, in affect
self.effect()
File "eggbot.py", line 309, in effect
self.plotToEggBot()
File "eggbot.py", line 551, in plotToEggBot
self.recursivelyTraverseSvg( self.svg, self.svgTransform )
File "eggbot.py", line 610, in recursivelyTraverseSvg
self.DoWePlotLayer( node.get( inkex.addNS( 'label', 'inkscape' ) ) )
File "eggbot.py", line 1008, in DoWePlotLayer
if str.isdigit( CurrentLayerName[:stringPos] ):
TypeError: descriptor 'isdigit' requires a 'str' object but received a 'unicode'


RE: layers - roofuskit - 11-24-2019 05:18 PM

(04-12-2019 05:57 PM)justinpogge Wrote:  i cannot get eggbot to plot layers, i just get an error that reads:

Traceback (most recent call last):
File "eggbot.py", line 1406, in <module>
e.affect()
File "C:\Program Files (x86)\Inkscape\share\extensions/inkex.py", line 283, in affect
self.effect()
File "eggbot.py", line 309, in effect
self.plotToEggBot()
File "eggbot.py", line 551, in plotToEggBot
self.recursivelyTraverseSvg( self.svg, self.svgTransform )
File "eggbot.py", line 610, in recursivelyTraverseSvg
self.DoWePlotLayer( node.get( inkex.addNS( 'label', 'inkscape' ) ) )
File "eggbot.py", line 1008, in DoWePlotLayer
if str.isdigit( CurrentLayerName[:stringPos] ):
TypeError: descriptor 'isdigit' requires a 'str' object but received a 'unicode'


The issue and fix are reported here: https://github.com/evil-mad/EggBot/issues/40

replace
Code:
CurrentLayerName = string.lstrip( strLayerName ) #remove leading whitespace
in eggbot.py with
Code:
CurrentLayerName = string.lstrip( strLayerName.encode( 'ascii', 'ignore' ) ) #remove leading whitespace