mosaic
mosaic copied to clipboard
Multiprocessing pickle challenges
Since pillow "Added support for encoding and decoding iTXt chunks" https://github.com/python-pillow/Pillow/pull/818
Certain images with those chunks are now unpicklable. https://github.com/python-pillow/Pillow/issues/1434
Causing this failure:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\spawn.py", line 115, in _main
self = reduction.pickle.load(from_parent)
TypeError: __new__() missing 2 required positional arguments: 'lang' and 'tkey'
Traceback (most recent call last):
File "C:/Users/myuser/Downloads/mosaic/mosaic.py", line 236, in <module>
mosaic(sys.argv[1], sys.argv[2])
File "C:/Users/myuser/Downloads/mosaic/mosaic.py", line 230, in mosaic
compose(image_data, tiles_data)
File "C:/Users/myuser/Downloads/mosaic/mosaic.py", line 204, in compose
Process(target=build_mosaic, args=(result_queue, all_tile_data_large, original_img_large)).start()
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\process.py", line 105, in start
self._popen = self._Popen(self)
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\context.py", line 322, in _Popen
return Popen(process_obj)
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\popen_spawn_win32.py", line 65, in __init__
reduction.dump(process_obj, to_child)
File "C:\Users\myuser\AppData\Local\Continuum\Anaconda3\lib\multiprocessing\reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
BrokenPipeError: [Errno 32] Broken pipe