storborg / axibot

Headless control software for the AxiDraw pen plotter.
http://axibot.readthedocs.io/
GNU General Public License v2.0
31 stars 8 forks source link

"ValueError" on all .svg plot||info attempts #43

Closed s33hunt closed 5 years ago

s33hunt commented 5 years ago

Bug

When I try to plot an .svg file or get info on an .svg, I get the following error:

> axibot info lines.svg Loading lines.svg... Extracting paths... Traceback (most recent call last): File "c:\users...\appdata\local\programs\python\python35\lib\runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "c:\users...\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users...\AppData\Local\Programs\Python\Python35\Scripts\axibot.exe__main__.py", line 9, in File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\cmd.py", line 180, in main return opts.function(opts) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\cmd.py", line 95, in info actions = file_to_actions(opts.filename, pen_up_delay, pen_down_delay) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\cmd.py", line 48, in file_to_actions paths = svg.extract_paths(filename) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\svg.py", line 247, in extract_paths recurse_tree(paths, root, matrix) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\svg.py", line 212, in recurse_tree recurse_tree(paths, node, matrix_new, parent_visibility=v) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\svg.py", line 216, in recurse_tree paths.append(transform_path(node.get('d'), matrix_new)) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\svg.py", line 188, in transform_path transform.apply(p, transform_matrix) File "c:\users...\appdata\local\programs\python\python35\lib\site-packages\axibot\transform.py", line 203, in apply raise ValueError("Don't know how to transform %r" % piece) ValueError: Don't know how to transform Move(to=(394.96965+438.69448j))

SVG File

All .svg files tested so far (some created by me in inkscape, others from the example folder). For this issue I'll focus on "lines.svg" from the examples folder.

Your Environment

Windows 10 and rasian linux. Same error on all attempts (with different "to" coordinates).

JelmerT commented 5 years ago

Having the same problem on macOS

storborg commented 5 years ago

Thanks for reporting this. The error looks like it might be related to a version mismatch of svg.path, but I haven't managed to replicate it yet using the version constraints in the current setup.py (in master).

@s33hunt it appears that the git sha1 that you specified (66f5f7ee6713a6b0ec438608272e54c75ef66b8b) does not exist in this repo. Is that possibly a sha1 from someone else's fork?

JelmerT commented 5 years ago

@storborg looks like you were right. Installed previous version of svg.path and everything seems to work.

pip uninstall svg.path pip install svg.path==2.2

JelmerT commented 5 years ago

Note I installed the pypi version before (0.0.2), which gave the error, the current version (0.0.3) on here is working. Might be good to release 0.0.3 so people don't run into the same problem.

storborg commented 5 years ago

Ok, I (finally) pushed a 0.0.3 release, so I'm going to close this now. Thank you!