Closed Geekfish closed 3 years ago
Thank you for this detailed error description.
I wasn't aware that this function wasn't available in some environments. Your proposal sounds like a good workaround for such platforms, and it shouldn't interfere with the existing behavior. If you have the time to create a PR that fixes this, I'd very much appreciate it!
Thank you for the superfast response @slhck ! I'll open a PR to address it.
Fixed by #157 and released in v1.22.3.
Hello there!
I am running
ffmpeg-normalize
on AWS lambda, python 3.8 runtime. I have run into the following issue with the logger:Expected behavior
When I run normalization with default settings, I expect to see a warning printed out about the default sample rate, for example:
Actual behavior Instead, I get back an error trace, such as this:
This is just an example, but the issue can apply to other logging statements in this library.
Cause I have looked into the cause of it, and it seems to be the following:
TqdmLoggingHandler
. I believe this was added so that we can log things without breaking the progress bar.multiprocessing.Lock
(here's the commit that introduced it)./dev/shm
). You can read more about this here.Possible Fix
tqdm
seems to already support environments with no multiprocessing support. This is their solution for lack of multiprocessing in Jython:https://github.com/tqdm/tqdm/commit/d1187ac5464fd5896361d4f1c8a9ed91c9e54b57
I think we could use a similar approach here and only set the lock when multiprocessing is available?
If you agree with this solution or have any other ideas or insights on how to solve this, I would be happy to work on a PR!
Environment (please complete the following information):
Amazon Linux 2 (lambda with python 3.8 runtime)
python --version
):3.8.11
ffmpeg -version
):1.22.2