inkstitch / inkstitch

Ink/Stitch: an Inkscape extension for machine embroidery design

Home Page:https://inkstitch.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

write_embroidery_file: no attribute 'pyembroidery_thread'

Maschkenator opened this issue · comments

Worked on my first SVG to PES conversion. The first test converting worked, then I tried to clean up the project and adjust the stitch start/stop points, and now I am unable to save the project to PES. This has happened before, and I restarted the whole project, and now it's back. Attached is the SCG and below is the error message:

UPDATE: found one object that for some reason caused simulator / realistic preview to "crash". Removed it, replaced it with a hand-made object, and I was then able to preview the patch, and also export without problem. Maybe there's a way to “point out” these issues ahead of time? In the attached file "Star" is the problem object.

=====
Ink/Stitch Version: 3.0.1 (osx)

Traceback (most recent call last):
File "inkstitch.py", line 84, in
File "inkex/base.py", line 231, in run
File "lib/extensions/output.py", line 65, in effect
File "lib/output.py", line 71, in write_embroidery_file
AttributeError: 'NoneType' object has no attribute 'pyembroidery_thread'

N81124_top-gun-maverick_logo_v2

I think the devs have been looking for files that reproduce this bug (a fairly old one: #1651 and #1477). Thanks for providing one.

Nice, nice. Thank you so much. It is indeed reproducible with your file!

@lexelby problem here is that we have a polyline with a fill. In Ink/Stitch we understand polylines as stroke paths only which we treat as a manual stitch. I don't know how widely polylines are used ... but we actually could treat polylines simply as fills or strokes like normal paths (get_path method works on them), but that would break backwards compatibility for former polylines. If we want to distinguish them in the params, we'd need at least think about what we want to do if they have no stroke but a fill. What do you think?

Oh, actually there would be a simple solution I think. We could increase the inkstitch svg version by one and during the svg update we apply a manual stitch setting to existing polylines and treat them from now on the same way as normal path elements?

Thanks for looking into this. I am in no way knowledgeable with anything said above, let alone InDesign or ink/stitch...I just want to add one more thing that I remembered as I read through the above: After importing the file, I noticed that the star was never "white" but see-through. I eventually "saw" when it was stitched that it had a black border that was missing the top right side of the star. I had no clue how or why that would happen. But, to get rid of the black line, I tried to remove anything related to the border (no color, 0mm width etc) and white infill until it finally worked. So, if I understand this correctly, maybe a "polyline" can somehow be identified, and a toggle lets you decide it you want it to be a manual stitch, or a fill?

In your case it would be best to convert it to a path (Path > Object to Path). That will make things easier for you.

I like that plan, @kaalleen! It's an ideal use of our file version system.