Closed osuzdalev closed 10 months ago
These are the culprits for sure. When removed it prints properly in the terminal:
# Set up Selenium logging to pass through the standard logging
selenium_logger.setLevel(log_level)
selenium_logger.error()
for handler in logging.root.handlers:
selenium_logger.addHandler(handler)
pushover_handler = NotificationHandler("pushover", defaults=pushover_defaults)
logger.add(pushover_handler, level="ERROR")
I also removed the unnecessary
# Remove the standard error logging to avoid repeated messages
error_logger = logger.add(sys.stderr)
logger.remove(error_logger)
Hi @osuzdalev.
The "--- Logging error ---"
header indicates that an unexpected error happened while a message was logged by one of your configured handler. This is not directly related to the "Phone login failed" error you're reporting, it's just that the faulty handler is your pushover_handler
, and it's configured with level="ERROR"
therefore the two stack traces appear at the same time.
Based on what you shared, it seems to be a problem with the way you configured pushover
:
notifiers.exceptions.BadArguments: Error with sent data: SecretStr('**********') is not valid under any of the given schemas
Something is likely wrong in your pushover_default
config, or this is a bug in the notifiers
library.
See documentation: https://notifiers.readthedocs.io/en/latest/providers/pushover.html.
@Delgan Thanks a lot for your help!
@Delgan Hi!
First off thank you for the wonderful lib!
I am working on a telegram bot that uses Selenium. Everytime an error is raised, it is first printed in the terminal window beautifully as intended:
But it is then followed by this right after:
What's confusing is that in the log file only the correct version is written...
Here is how I setup my logging:
Thanks a lot in advance!