migvel / color_trace

Traces multiple color images using potrace. This is similar to Inkscape's Trace Bitmap function.
GNU General Public License v2.0
98 stars 40 forks source link

unsupported operand type(s) for *: 'int' and 'NoneType' when using --remap #5

Closed phdoerfler closed 7 years ago

phdoerfler commented 7 years ago
python3 color_trace_multi.py -v -i page.bmp -r remap.png -o out.svg

yields: unsupported operand type(s) for *: 'int' and 'NoneType'.

scribblemaniac commented 7 years ago

I can confirm this, full trace:

Traceback (most recent call last):
  File "color_trace_multi.py", line 886, in main
    color_trace_multi(inputs, outputs, colors, processcount, dither=dither, **color_trace_kwargs)
  File "color_trace_multi.py", line 780, in color_trace_multi
    total = multiprocessing.Value('i', len(layers) * colors)
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'
scribblemaniac commented 7 years ago

This should be fixed when #6 is merged. If you do not want to wait until then, you can pull the code from my branch.

phdoerfler commented 7 years ago

thanks for providing a fix so quickly! I can confirm it fixes the issue.