meerk40t: SVG CLI error: object of type 'LaserOperation' has no len()
Trying to use the command line options to parse and execute a job:
meerk40t -zaS 100 ~/circle.svg
I get the following error:
Traceback (most recent call last):
File "/usr/local/bin/meerk40t", line 8, in <module>
sys.exit(run())
File "/usr/local/lib/python3.9/site-packages/meerk40t/main.py", line 322, in run
device("plan validate\n")
File "/usr/local/lib/python3.9/site-packages/meerk40t/kernel.py", line 136, in __call__
return self._kernel.console(data)
File "/usr/local/lib/python3.9/site-packages/meerk40t/kernel.py", line 2231, in console
self._console_parse(command, channel=self._console_channel)
File "/usr/local/lib/python3.9/site-packages/meerk40t/kernel.py", line 2316, in _console_parse
data, remainder, input_type = command_funct(
File "/usr/local/lib/python3.9/site-packages/meerk40t/kernel.py", line 1173, in inner
returned = func(command=command, channel=channel, **ik, **kwargs)
File "/usr/local/lib/python3.9/site-packages/meerk40t/core/cutplanner.py", line 296, in plan
self.execute()
File "/usr/local/lib/python3.9/site-packages/meerk40t/core/cutplanner.py", line 400, in execute
cmd()
File "/usr/local/lib/python3.9/site-packages/meerk40t/core/cutplanner.py", line 469, in strip_rasters
if len(op) == 1 and isinstance(op[0], SVGImage):
TypeError: object of type 'LaserOperation' has no len()
Here’s the SVG file:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="60mm"
height="60mm"
viewBox="0 0 60 60"
version="1.1"
id="svg8"
inkscape:version="1.0.2 (e86c8708, 2021-01-15)"
sodipodi:docname="circle.svg">
<defs
id="defs2">
<rect
x="71.06275"
y="119.13209"
width="32.594937"
height="12.257925"
id="rect855" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.94972573"
inkscape:cx="134.40268"
inkscape:cy="43.665962"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1252"
inkscape:window-height="943"
inkscape:window-x="0"
inkscape:window-y="25"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-57.690468,-82.636902)">
<circle
style="fill:none;fill-rule:evenodd;stroke-width:0.264583;stroke:none;stroke-opacity:1"
id="path10"
cx="87.690468"
cy="112.6369"
r="30" />
<text
xml:space="preserve"
id="text853"
style="font-style:normal;font-weight:normal;font-size:10.58329999999999949px;line-height:1.25;font-family:sans-serif;white-space:pre;shape-inside:url(#rect855);fill:#0000ff;fill-opacity:1;stroke:none;text-align:center"
x="13.492674"
y="0"><tspan
x="73.86251"
y="128.78828"><tspan
style="text-align:center;text-anchor:middle;fill:#0000ff;fill-opacity:1">TEST</tspan></tspan></text>
</g>
</svg>
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 32 (17 by maintainers)
I figured it out! I just ended up deleting the actual operations, since deleting the elements didn’t really work.
Here’s the final command line:
meerk40t -z -e “timer 1 1 home” -e “inkscape locate input 304705.svg text2path load” -e “element* translate 0 0” -e “element* translate 3in 3in” -e “timer 1 2 operation2,3 delete” -e “timer 1 3 elements* engrave -s 110” -e “timer 1 10 plan copy preprocess validate list append home blob list spool” -e “timer 1 50 quit”
The menus do exist in Mac OS X. They conform to Mac OS standards instead though; and appear in the regular menu bar at the top of the screen; next to the Apple menu, and MeerK40t menu. They are only active when the Jobs window is in front.
The Camera window will also override menus to show those are specific to the camera window as well.