abey79 / vpype-pixelart

Pixel art plotting in vpype
MIT License
78 stars 2 forks source link

Error starting up #3

Open pythagorean opened 2 years ago

pythagorean commented 2 years ago

$ python --version Python 3.8.10

$ vpype pixelize --help

Warning: entry point could not be loaded. Contact its author for help.

Traceback (most recent call last): File "/home/pythagorean/.local/lib/python3.8/site-packages/vpype_cli/cli.py", line 204, in cli cast(click.Group, ctx.command).add_command(entry_point.load()) File "/home/pythagorean/.local/lib/python3.8/site-packages/pkg_resources/init.py", line 2450, in load return self.resolve() File "/home/pythagorean/.local/lib/python3.8/site-packages/pkg_resources/init.py", line 2456, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/pythagorean/.local/lib/python3.8/site-packages/shiboken2/files.dir/shibokensupport/feature.py", line 142, in _import return original_import(name, *args, **kwargs) File "/home/pythagorean/.local/lib/python3.8/site-packages/pixelart/pixelart.py", line 113 up := cur_pixel.move((0, -1)), ^ SyntaxError: invalid syntax

abey79 commented 2 years ago

I can reproduce with python 3.8, but I don't understand the issue. The walrus operator is supported by Python 3.8. Might be related to PySide2? The work-around is to upgrade to python 3.9 or, ideally, python 3.10.

rachase commented 1 year ago

Google said to encase the walrus in parenthesis. Seemed to run?

//try to move as far up/left in that pixel black as possible while { (up := cur_pixel.move((0, -1))), (left := cur_pixel.move((-1, 0))),