ValueError: I/O operation on closed file

Hello team, I hope you are doing well.

Currently, I am working on Amazon EMR, and I am using the RAY library. To store the logs permanently in S3, I am using Fluent Bit.
However, when I start the RAY service, it throws the following error:
— Logging error —
ValueError: I/O operation on closed file.

This issue only occurs when I start the Fluent Bit service.

Do you have any suggestions on how to resolve this?

Thank you!