X-Debbugs-CC: manp...@gmail.com

Hi,

在 2024-09-29日的 14:55 -0400,Jonathan Kamens写道:
>  I am having trouble ascertaining what's going on here.
>  The traceback does not make any sense to me when paired with the KeyError 
> shown. Note that the line of code where the traceback claims the error is 
> occurring does not
> reference the key "debfile", it references the key "package", which is 
> defined correctly in the code:
>          ALCLog.debug(_("Extracting installed changes for %(package)s") %
>                       {'package': self.binary})
>   
> The key "debfile" is only used one place in the entire program, and it's 
> defined properly there. Elsewhere in DebianFiles.py:
>          ALCLog.debug(_("Extracting changes from %(debfile)s") %
>                       {'debfile': self.path})
>  Just to clarify, is this error reproducible, or did it just happen once? And 
> if the latter, was the apt run when it happened the same apt run when 
> apt-listchanges was
> upgraded to 4.6? If so, can you tell me what version of apt-listchanges you 
> had before that apt run?

Just took a deeper look, and I think the error lies in the translation file:

https://salsa.debian.org/debian/apt-listchanges/-/blob/e8eb05d999f89ef046e58acfee9b00e238ff9a47/po/zh_CN.po#L164-167

This is obviously a mistranslation with incorrect variable placeholder.
I believe the fix would thus be easy.

Thanks,
Boyuan


> On 9/29/24 2:29 PM, Boyuan Yang wrote:
>   
> >  The following Python traceback will appear on my Debian Testing system 
> > between
> > packaging downloading and package installation:
> > 
> > Traceback (most recent call last):
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/apt_listchanges.py", 
> > line 286, in main
> >     doit(config)
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/apt_listchanges.py", 
> > line 171, in doit
> >     return doit_with_snapshot(config, snapshot, force_db)
> >            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/apt_listchanges.py", 
> > line 223, in doit_with_snapshot
> >     news, changes = process_pkgs(config, frontend, seen_db, pkgs,
> >                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/apt_listchanges.py", 
> > line 317, in process_pkgs
> >     (news, changelogs) = process_pkg(
> >                          ^^^^^^^^^^^^
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/apt_listchanges.py", 
> > line 373, in process_pkg
> >     pkg.extract_changes_via_installed('both', seed_filterer)
> >   File "/usr/lib/python3/dist-packages/apt_listchanges/DebianFiles.py", 
> > line 565, in extract_changes_via_installed
> >     ALCLog.debug(_("Extracting installed changes for %(package)s") %
> >                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > KeyError: 'debfile'

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to