JJRobots COMMUNITY

Full Version: layers
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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'
(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
Reference URL's