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

In Python3.12 optimizing a single image triggers a silent error #6

Open
victordomingos opened this issue Jan 18, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@victordomingos
Copy link
Owner

In Python3.12 optimizing a single image triggers a silent error, visible as a traceback in command line. In the GUI no feedback is given to the user and the image stays untouched.

Exception in Tkinter callback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/tkinter/__init__.py", line 1962, in __call__
    return self.func(*args)
           ^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/optimize_images_x/gui/main_window.py", line 324, in select_files
    self.optimize_images()
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/optimize_images_x/gui/main_window.py", line 464, in optimize_images
    for result in executor.map(do_optimization, tasks):
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/process.py", line 864, in map
    results = super().map(partial(_process_chunk, fn),
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/_base.py", line 608, in map
    fs = [self.submit(fn, *args) for args in zip(*iterables)]
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/concurrent/futures/process.py", line 197, in _get_chunks
    chunk = tuple(itertools.islice(it, chunksize))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/optimize_images_x/gui/main_window.py", line 446, in <genexpr>
    tasks = (convert_task(t, self.task_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/optimize_images_x/task_conversion.py", line 29, in convert_task
    return OITask(path,
           ^^^^^^^^^^^^
TypeError: Task.__new__() missing 1 required positional argument: 'output_config'
@victordomingos victordomingos added the bug Something isn't working label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant