diff options
| author | Lex Neva <lexelby@users.noreply.github.com> | 2019-02-16 17:07:34 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-16 17:07:34 -0500 |
| commit | 2ab4c451e8042868b2516a6b3fe1f60836f27ffe (patch) | |
| tree | 0ce616ac57e6a2aa507461486233c71373467c9a /lib/output.py | |
| parent | bd6e4d9d32fd314b66f3c5d798c7151bf543d07f (diff) | |
| parent | fa3236372bcee28f4aaa78da47b68c5d7f32cca4 (diff) | |
tons of bug fixes (#364)
bug fixes
Diffstat (limited to 'lib/output.py')
| -rw-r--r-- | lib/output.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/output.py b/lib/output.py index 5fa7791f..21622765 100644 --- a/lib/output.py +++ b/lib/output.py @@ -1,11 +1,13 @@ -import sys import pyembroidery +import sys + import simpletransform +from .commands import global_command from .i18n import _ -from .utils import Point +from .stitch_plan import Stitch from .svg import PIXELS_PER_MM, get_doc_size, get_viewbox_transform -from .commands import global_command +from .utils import Point def get_command(stitch): @@ -57,6 +59,7 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): origin = get_origin(svg) pattern = pyembroidery.EmbPattern() + stitch = Stitch(0, 0) for color_block in stitch_plan: pattern.add_thread(color_block.color.pyembroidery_thread) @@ -99,5 +102,5 @@ def write_embroidery_file(file_path, stitch_plan, svg, settings={}): except IOError as e: # L10N low-level file error. %(error)s is (hopefully?) translated by # the user's system automatically. - print >> sys.stderr, _("Error writing to %(path)s: %(error)s") % dict(path=file_path, error=e.message) + print >> sys.stderr, _("Error writing to %(path)s: %(error)s") % dict(path=file_path, error=e.strerror) sys.exit(1) |
