Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeatedly receiving a "OSError: cannot write mode CMYK as PNG" error #27

Open
aimforsilence opened this issue Jun 26, 2024 · 0 comments

Comments

@aimforsilence
Copy link

                 ┬─┐┌─┐┌─┐┌┐ ┌─┐ ┌─┐┬ ┬
                 ├┬┘├┤ │  ├┴┐┌─┘ ├─┘└┬┘
                 ┴└─└─┘└─┘└─┘└─┘o┴   ┴

multiprocessing.pool.RemoteTraceback: eroes_077.webp
"""
Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\site-packages\PIL\PngImagePlugin.py", line 1289, in _save
rawmode, mode = _OUTMODES[mode]
~~~~~~~~~^^^^^^
KeyError: 'CMYK'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\util.py", line 95, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\archive.py", line 149, in convert_page_worker
page.save(new_fp)
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\archive.py", line 227, in save
self.fmt.save(self.img, dest)
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\formats.py", line 58, in save
img.save(dest, format='PNG', optimize=True, compress_level=9)
File "C:\Program Files\Python312\Lib\site-packages\PIL\Image.py", line 2459, in save
save_handler(self, fp, filename)
File "C:\Program Files\Python312\Lib\site-packages\PIL\PngImagePlugin.py", line 1292, in _save
raise OSError(msg) from e
OSError: cannot write mode CMYK as PNG
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Program Files\Python312\Scripts\recbz.exe_main
.py", line 7, in
File "C:\Program Files\Python312\Lib\site-packages\reCBZ_main
.py", line 378, in main
wrappers.auto_repack_archive(filename)
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\wrappers.py", line 201, in auto_repack_archive
results = compare_fmts_archive(fp, quiet=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\wrappers.py", line 111, in compare_fmts_archive
results = ComicArchive(fp).compute_fmt_sizes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\archive.py", line 382, in compute_fmt_sizes
results = map_workers(worker, config.allowed_page_formats(), multithread=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\util.py", line 114, in map_workers
return Tpool.map(func, tasks)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 774, in get
raise self._value
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 48, in mapstar
return list(map(*args))
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\archive.py", line 362, in compute_single_fmt
results = map_workers(worker, sample_pages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\site-packages\reCBZ\util.py", line 122, in map_workers
return MPpool.map(func, tasks)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 367, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\multiprocessing\pool.py", line 774, in get
raise self._value
OSError: cannot write mode CMYK as PNG

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant