scottbez1 / splitflap

DIY split-flap display
https://scottbez1.github.io/splitflap
Other
3.18k stars 263 forks source link

svg processor doenst work? #42

Closed vettorazi closed 5 years ago

vettorazi commented 5 years ago

hey guys, i am trying generate the svg from the py, but it shows: splitflap znb$ 3d/generate_2d.py Traceback (most recent call last): File "3d/generate_2d.py", line 27, in from svg_processor import SvgProcessor File "/Users//splitflap/3d/svg_processor.py", line 16, in from svg.path import ( ImportError: No module named svg.path :splitflap znb$ 3d/generate_2d.py Traceback (most recent call last): File "3d/generate_2d.py", line 27, in from svg_processor import SvgProcessor File "/Users//splitflap/3d/svg_processor.py", line 16, in from svg.path import ( ImportError: No module named svg.path

scottbez1 commented 5 years ago

Hey there. It looks like you need to install the svg.path python library. Assuming you're on Ubuntu/Linux (which is the only supported OS at the moment), you'll want to run something like sudo pip install -r "3d/scripts/requirements.txt" to install the necessary python dependencies.

scottbez1 commented 5 years ago

Did that work? Closing for now, but please reopen if you're still running into issues.

whimsee commented 1 year ago

Somewhat related since I also ran across this issue from a different angle (MutableMapping didn't import which lead to this error) and even went and VMed the latest Ubuntu to see if it's OS-related, but that didn't fix it. Turns out it's apparently related to https://stackoverflow.com/questions/70870041/cannot-import-name-mutablemapping-from-collections because direct imports have stopped working since Python 3.9.

So I edited path.py ("from collections import MutableMapping" to "from collections.abc import MutableMapping") and that did the trick.

Edit: To be specific, it's still an issue for me on Windows but that's to be expected. This was an issue on Ubuntu but the above fixed it.