jkenlooper / piecemaker

Create jigsaw puzzle pieces
GNU Lesser General Public License v3.0
64 stars 12 forks source link

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #20

Open triplesky opened 2 years ago

triplesky commented 2 years ago

when i run piecemaker --dir test --number-of-pieces 100 test.jpg command on mac image

jkenlooper commented 2 years ago

Thank you for the bug report. It looked like this was caused by the dependency update and the 'glue' package. I opted to only copy over the stuff from that package that piecemaker uses since it seems no longer maintained. Try installing piecemaker again with a fresh install to see if this fixes your problem.

triplesky commented 2 years ago

now there are new exception: 1, FileNotFoundError: [Errno 2] No such file or directory: 'test/lines.svg' .this mean i need create lines.svg myself? 2, i create lines.svg by a site, FileNotFoundError: [Errno 2] No such file or directory: 'optipng'

jkenlooper commented 2 years ago

The lines.svg file is created by the piecemaker command; it might only have some partial files in that test directory because of previous errors. Try removing that test directory you created and make a new directory that is empty. Running the piecemaker script again should recreate the necessary files in the 'test' directory.

The second error is most likely because you don't have the 'optipng' command installed on your machine. I would recommend using a Linux machine or using the provided Dockerfile to use piecemaker on a Mac or Windows machine. Otherwise you'll need to make sure you install all the other dependencies that this piecemaker script requires. See the Docker Usage instructions in the README.md https://github.com/jkenlooper/piecemaker#docker-usage