extremely vague Python debug question 

I understand this is super vague, but if I have a Python script that I want to run 24/7, but every so often it just stops working (but doesn't error out)...

anything I should check that I might not have thought of?

Follow

extremely vague Python debug question 

@schlink Depending on how you run this you might want to run it in the Python Debugger to see if it gives more error messages. Downside is the script will run way slower than normal.

This will do the trick:

python -m pdb script.py

Alternatively you could wrap the whole script into a try / except with a broad exception to see if that might catch anything that is being raised (but if its not raising an exception then it might not work)

· · Web · 1 · 0 · 0

extremely vague Python debug question 

@schlink You could also check to see when it stops and see if there's anything logged at the system level. It might not be anything under Python's control of when it ends. Something like dmesg could give some more clues.

extremely vague Python debug question 

@schlink Hope this helps. I don't envy you having to find these sorts of bugs, but hopefully this will bring something better to bear.

Sign in to participate in the conversation
Octodon

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!