Deutsch   English   Français   Italiano  
<mailman.12.1733773130.2965.python-list@python.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.roellig-ltd.de!open-news-network.org!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: Michael Torrie <torriem@gmail.com>
Newsgroups: comp.lang.python
Subject: Re: How to catch a fatal error in Python 2.7?
Date: Mon, 9 Dec 2024 12:38:43 -0700
Lines: 25
Message-ID: <mailman.12.1733773130.2965.python-list@python.org>
References: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
 <6190ce2a-a5bf-6872-1714-e1f8677e0add@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de txVAmPOkavZ6i8z/sEgLWQfAs87SEIuNYBFnbbqD2Gzw==
Cancel-Lock: sha1:c1oWVqdTlBf6J3YLXVBhLNwYuWY= sha256:Ipqxaj4Ly1OivgerTLjm/6QuBvEk9IpYMs4TjhTv6zE=
Return-Path: <torriem@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
 reason="2048-bit key; unprotected key"
 header.d=gmail.com header.i=@gmail.com header.b=gtSuWujc;
 dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.004
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '(which': 0.04; 'else.':
 0.07; 'subject:error': 0.07; '2.7': 0.09; 'linux': 0.09;
 'subject:Python': 0.12; 'memory': 0.15; 'supported': 0.15;
 'date,': 0.16; 'help!': 0.16; 'interpreter': 0.16; 'microphone':
 0.16; 'recover': 0.16; 'referencing': 0.16; 'script.': 0.16;
 'subject:2.7': 0.16; 'wrote:': 0.16; 'problem': 0.16; 'python':
 0.16; 'message-id:@gmail.com': 0.18; 'bug': 0.19; 'pm,': 0.19;
 'to:addr:python-list': 0.20; 'code': 0.23; 'library': 0.26;
 'think': 0.29; 'error': 0.29; 'whole': 0.30; 'header:User-
 Agent:1': 0.30; 'subject:How': 0.31; 'program,': 0.31; 'program':
 0.32; 'python-list': 0.32; 'but': 0.32; 'there': 0.33; 'script':
 0.33; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
 'able': 0.34; 'from:addr:gmail.com': 0.34; 'using': 0.37; 'could':
 0.37; 'received:192.168': 0.37; 'way': 0.38; 'thanks': 0.39;
 'hello,': 0.39; 'something': 0.40; "there's": 0.61; 'involved':
 0.63; 'leading': 0.63; 'your': 0.64; 'latter': 0.69; 'ps:': 0.69;
 'resulting': 0.70; 'bluetooth': 0.84; 'catch': 0.84; 'exceptions':
 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1733773127; x=1734377927; darn=python.org;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:to:subject:user-agent:mime-version:date:message-id:from
 :to:cc:subject:date:message-id:reply-to;
 bh=dd0V6oHu1E/6+T/IJgamkOF1PbI+S9z2IzCyDkLmBTc=;
 b=gtSuWujco+8Ai3TmxJI5HqUdmuXwGZhql0FBPdWNX5f/PFyM04TEXGyzw4YOcNPOmY
 ffakb/yDl8piAikrfFf28+nfTAIXJY8KWgBjxwu5J7ZMm61RZ4XzABBpKvz/vMBsW9p4
 tWTlvhpraX2dH5VtyQRr75URW6IHss/vzurDy35896fxEJGsdIynwr3SrntgDSK78BmT
 svkIe7cXPQeph00Hh3j16bpUrxN22N8wOIofRRlJ7Ct7PB4wb9bLsbDFSuaakUPGmB/x
 kfD91QUb4b6Fm/x1AxcJpqvCO5J63Z4y4F6g8Jjf0T1HPP0M9918NbplHrFoAddFHFJR
 C4MQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1733773127; x=1734377927;
 h=content-transfer-encoding:in-reply-to:from:content-language
 :references:to:subject:user-agent:mime-version:date:message-id
 :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=dd0V6oHu1E/6+T/IJgamkOF1PbI+S9z2IzCyDkLmBTc=;
 b=iydktpuRaU0OQ+nepeVLGkOe+c/1jHWjeRiTNQg2vr7wVq+kplUUEdasPurKvWKQxX
 VlCyJ4T0jcs7jo/ETgs8TqgTNNf5WOjC9o2mjvhSP1T+hwyKryRRCcudvYktTCtHj0Zv
 MtYw/G3NlaTfkuJLqkXNm0cfVkCM5/1ZepFFK41Qp1nt2xrOoCaVxnReJZD6ewBy+nUj
 r3EhEcV4q7jSPlM/43jxDy6IC0ERXg5ZjpQng3g0qYPBjEqbg0SEN1By2iOIaujdsMkM
 xGyZsEw6NBWspA88IHep2AW7keFupq2IrKX1xRshk8rKs73ha93pKTzwIzXutGxM5jLV
 qffQ==
X-Gm-Message-State: AOJu0Yx3/n4i1UIeDGNS1nVto/VdOPV0UONd1i3QUuluXxJYf5zJE1wF
 0e23zTt0kbUyO+Zhn6fFDR8XWEKNawY1GYGH/4VT/GhmESfA9iiXBrpd598u
X-Gm-Gg: ASbGncvKpK9HTwxc227g2tcy0Q39X52J0ip7iWMCLWM3g0P/QtFR2EEgbgAuPhhjVje
 iAmBQxmHZgy+q43Xx94Fw5rBjqJ1OKA0QSOaZyn3hMe6dG6q88EWqPdHUf2atdGzkdPy7k+KloV
 T4UTTn8YN7Ew2QOEQuw4/TaecCbuhZPcz+W3YHpoyH6SIoOWXhGGUnHzlVdXZ4YwdgNcvd082Wo
 79NCoGv8nqRMEQko6PZMnTSV27cd/uFZbB2I6ktDgYUheQwpaZZQg==
X-Google-Smtp-Source: AGHT+IEUqySMcOvIOswWMJpUkAPNyyYdAwZx2ebw/5CrkiRqkAPbo57ObTot7pkfiI0V30t0UWC7qQ==
X-Received: by 2002:a17:903:41c3:b0:215:94ef:6071 with SMTP id
 d9443c01a7336-21614db6053mr79615875ad.14.1733773126648; 
 Mon, 09 Dec 2024 11:38:46 -0800 (PST)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
 Thunderbird/102.15.1
Content-Language: en-US
In-Reply-To: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
 <python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
 <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
 <mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <6190ce2a-a5bf-6872-1714-e1f8677e0add@gmail.com>
X-Mailman-Original-References: <CAGJtH9RSph6W6tMePZYdYPCEmgL22VoDLMjfGWdjq=H+6hMR7g@mail.gmail.com>
Bytes: 6385

On 12/9/24 12:19 PM, marc nicole via Python-list wrote:
> Hello,
> 
> The fatal error exits the program with a code -1 while referencing the
> memory address involved and nothing else.
> 
> How to catch it in Python 2.7?

Does the problem occur with Python 3.x?  At this date, Python 2.7 is
only supported by your vendor if you are using an enterprise Linux
distribution.

I don't think there is a way to recover from that error in your python
script.  It could be a bug in the Python interpreter (which will never
be fixed in 2.7), or it could be a bug in a library somewhere. The
latter is most likely.  There's nothing you can do about it from a
Python script to recover.

> PS: please not I am not talking about exceptions but an error resulting
> from the disconnection of my bluetooth microphone abruptly and leading to
> the halting of the whole program, I need to be able to do something when it
> occurs.
> 
> Thanks for the help!