Closed Amiralgaby closed 3 years ago
Hello,
I tried to reproduce latest master
revision with various Python versions, here are the results:
I will try to figure out what happens, thank you very much for your report! :+1:
I thought I was not able to reproduce anymore but it not reproducible every time (and I had the bug with PNGs too)... It looks like a race condition with concurrent.futures or multiprocessing...
I also had various stack traces:
Exception in thread QueueManagerThread:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.8/concurrent/futures/process.py", line 376, in _queue_management_worker
thread_wakeup.clear()
File "/usr/lib/python3.8/concurrent/futures/process.py", line 93, in clear
while self._reader.poll():
File "/usr/lib/python3.8/multiprocessing/connection.py", line 255, in poll
self._check_closed()
File "/usr/lib/python3.8/multiprocessing/connection.py", line 136, in _check_closed
raise OSError("handle is closed")
OSError: handle is closed
Exception in thread QueueManagerThread:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.8/concurrent/futures/process.py", line 441, in _queue_management_worker
shutdown_worker()
File "/usr/lib/python3.8/concurrent/futures/process.py", line 334, in shutdown_worker
call_queue.put_nowait(None)
File "/usr/lib/python3.8/multiprocessing/queues.py", line 132, in put_nowait
return self.put(obj, False)
File "/usr/lib/python3.8/multiprocessing/queues.py", line 82, in put
raise ValueError(f"Queue {self!r} is closed")
ValueError: Queue <concurrent.futures.process._SafeQueue object at 0x7f9e642f1ac0> is closed
It seems to be this bug, that has been fixed in Python 3.9: https://bugs.python.org/issue39995
In my tests, YOGA was able to generate the output image despite the exception displayed in the console. Can you confirm that it works the same for you?
This bug is located in Python itself, and is fixed in Python 3.9. As it is not blocking for using YOGA (only error displayed on console, but image optimized anyway), there no need for a workaround, so I close the issue.
Thank you for reporting it! :)
Hi Flozz,
Bug description
What happened
An exception as been raised.
What was expected
No exception.
Step to reproduce
Steps to reproduce: I have chosen an image in JPG format, start the optimization process. When the optimization finished, an exception was thrown.
System information
Operating system (with version): Ubuntu 20.04
How did you installed the software?
pip3 install yoga-image-optimizer
)YOGA Image Optimizer version: 1.0.1