Odd locale error that has disappeared on reboot.

Peter J. Holzer hjp-python at hjp.at
Thu Dec 9 15:07:17 EST 2021


On 2021-12-09 10:38:58 +0000, Chris Green wrote:
> Julio Di Egidio <julio at diegidio.name> wrote:
> > Still your code wouldn't pass review: you do need some exception 
> > handling there
[...]
> However catching and re-trying isn't going to help at all.  It happily
> produced the same arror every 10 minutes throughout the night until I
> rebooted the system.

I agree. Only catch exceptions which you can reasonably handle. For
those which you can't handle (and "some part of my Python installation
has just gone AWOL" is one of them) crashing with a stack trace is
almost certainly your best option.

> I suppose I *could* reboot after (say) three failures

Maybe, but I wouldn't do that in the python program itself, but in a
separate monitor process.

> but it seems a bit drastic! :-)

Yup. I'd do that only if I've run out of other options (which has
happened in the past and probably will happen in the future).

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | hjp at hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mail.python.org/pipermail/python-list/attachments/20211209/ac576da4/attachment.sig>


More information about the Python-list mailing list