Deutsch English Français Italiano |
<mailman.96.1731374262.4695.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico <rosuav@gmail.com> Newsgroups: comp.lang.python Subject: Re: FileNotFoundError thrown due to file name in file, rather than file itself Date: Tue, 12 Nov 2024 12:17:27 +1100 Lines: 11 Message-ID: <mailman.96.1731374262.4695.python-list@python.org> References: <87v7wt986z.fsf@zedat.fu-berlin.de> <CAPTjJmoJErFTE-oS2X_Z+2yC6bMXvHZi0=CxkGhWnVtd4Gacvw@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: news.uni-berlin.de uf1AJP1hhGKjBAy4luMRBgNxJTpRqTLcca6B1LTta5rw== Cancel-Lock: sha1:vJxI5fH8ds9Pv6vLjCo2TLQS0C0= sha256:l4HSRQ7FtDKPpbxw3Ds8kCI0zHdamg3cKRgOREpKt5g= Return-Path: <rosuav@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=QJCBk7r6; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:name': 0.07; 'better,': 0.09; 'log': 0.12; 'assuming': 0.16; 'attributes': 0.16; 'bennett': 0.16; 'chrisa': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'generating': 0.16; 'message?': 0.16; 'wrote:': 0.16; 'to:addr:python-list': 0.20; 'exception': 0.22; 'subject:file': 0.22; 'error': 0.29; 'tue,': 0.31; 'message- id:@mail.gmail.com': 0.31; 'python-list': 0.32; 'path': 0.33; 'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34; 'from:addr:gmail.com': 0.34; 'file': 0.38; 'should': 0.40; 'between': 0.63; 'your': 0.64; 'let': 0.65; 'terms': 0.69; 'received:mail-lj1-x22d.google.com': 0.69; 'subject: \n ': 0.84; 'subject:than': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731374259; x=1731979059; darn=python.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=5sfcMfATOS0+4Xu0V3Jj2q/hNnXo235P4IKrnm+2+fE=; b=QJCBk7r6AHXR5BEoZCHLRdDnZhkI2sv5PfqiDzrY5voNcUx7nBZl5ONz+yw/yQB8Fg X/JOr9tY45Z9nSqrPSNZ+Y7+coNrSbb9nd2BWr/bpFCXmcAD4rcwWLoF5YMlS1dKU986 k/xNrLpHTOKnJWBPwT6nBLZhR+1Rz/9JEyD74zUv7pGwisB7AmD+lGi0/YyQwQw7AyVe 5sn+T+gKxpY6Av7+ghgJA7r/MbnZNPrbL39kIgOoGtFV309dh1uZApoTvIZYSEijaye6 OMVT94WFjMe6bKwxf9gVvysw86iScw3QpoGuMTvG8zlNGM0jJ1j5to6Cm8V+CTXMoQCH q6IQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731374259; x=1731979059; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5sfcMfATOS0+4Xu0V3Jj2q/hNnXo235P4IKrnm+2+fE=; b=l33XcJOblubAaJ/jG/U1pHGtJbyJheSoeiQuSexT1fDIOcpLXsQ0crGdIxG1Dj0Rgt pZje7j0/tMlXY0vueldWq5hKoX+aXOkWWbSQXtanmQ0e2DLkf9HRQ59tIMvJu6Ylwavv 7syNJS56byPHpA2+7Xxi7MJixglK/GaOFkJXVzqU4nGKH0Hj1XY38gKujzxpgmoeNjJU vyH/bsXMccjrbt0khUduSdteWkvwb9O54j2jGT7QBID6z3645qDN2267cmEGmZdEijjm wADGebGlOhg8f1wrCJ3/CpvixgqVdd6xFgC5lvVxcdBIi9NGp37e4gQY46wh65Z7iPw3 i8LA== X-Gm-Message-State: AOJu0YwFkvxYuSJ2169UBuNEYtJ6drnEc6NYk39qJokd7qy2D73nGdv6 Y87sccue8giF0Gx4cz1oGsVPpdhmrl7c+JvXM92QJKTS/wkwq+D1fPhd8qpDOWD5fWk1PfEkCHa qCleyv26QI22atwnA4Z61DUBSlZyYpQ== X-Google-Smtp-Source: AGHT+IGYuIeiZ5adbgzcQxLfueaeh4pfJyejElFNrhXallj01zB/o9zaVmPDD7PyCJRV/CoV9BFHy7gvOojl7EK8I1g= X-Received: by 2002:a2e:b895:0:b0:2fb:5035:7e4 with SMTP id 38308e7fff4ca-2ff20162842mr78675991fa.5.1731374259295; Mon, 11 Nov 2024 17:17:39 -0800 (PST) In-Reply-To: <87v7wt986z.fsf@zedat.fu-berlin.de> 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: <CAPTjJmoJErFTE-oS2X_Z+2yC6bMXvHZi0=CxkGhWnVtd4Gacvw@mail.gmail.com> X-Mailman-Original-References: <87v7wt986z.fsf@zedat.fu-berlin.de> Bytes: 4897 On Tue, 12 Nov 2024 at 01:59, Loris Bennett via Python-list <python-list@python.org> wrote: > 2. In terms of generating a helpful error message, how should one > distinguish between the config file not existing and the log file not > existing? By looking at the exception's attributes rather than assuming and hard-coding the path in your message? Or, even better, just let the exception bubble. ChrisA