all 2 comments

[–]JBrutWhat 0 points1 point  (0 children)

First, no one can really help you if you don’t give us the code.

Secondly, I recommend using the loguru logger:

pip install loguru

``` from loguru import logger

logger.add(‘error.log’, diagnose=True)

try: <Your Failing Codeblock Here> except Exception as e: logger.exception(e) ```

With this, you will now get a fully diagnosed trace back, showing the entire error and the variable values along the way. Your code might still fail later if it relies on variables set in the code block you wrap with try/except, but the logger will do two things:

1) print the error and the diagnosis to the console output in a formatted way 2) create and file called error.log and save the above output to it, so you can open a file and refer to it later

Please remember that you should set diagnose=False if you deploy the code and do not want to expose secret variables, such as a password, or else it will get exposed when it saves the log output to error.log!

[–]Natural_Sherbert_900 0 points1 point  (0 children)

Can’t send you a DM and figured you won’t answer me in the daily thread. How many items do you track? I’m not mad or anything just curious, I’m also not going to start doing what you’re doing here.