Open sunilthakan opened 2 weeks ago
The recent changes in the googlenewsdecoder library introduced a setup_logging() function in new_decoderv1 that configures logging to write to a file (e.g., google_news_new_decoderv1.log). This change causes issues in environments with a read-only file system. Removing or modifying the file-based logging setup will improve compatibility and prevent runtime errors in environments with restricted file access, making the library more versatile.
okay in next updates.
I ran into this issue when using your super helpful and amazing library on a Streamlit app. For me it helped to simply remove the logging.FileHandler(log_file) from the handlers list in the setup_logging function. It now only contains the logging.StreamHandler() which is fine for my purposes. Thanks for looking into this!
logging.basicConfig(
level=logging.ERROR,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[logging.StreamHandler()],#removing logging.FileHandler(log_file) from the handlers list
)
The recent changes in the googlenewsdecoder library introduced a setup_logging() function in new_decoderv1 that configures logging to write to a file (e.g., google_news_new_decoderv1.log). This change causes issues in environments with a read-only file system. Removing or modifying the file-based logging setup will improve compatibility and prevent runtime errors in environments with restricted file access, making the library more versatile.