On Sun, Dec 12, 2021 at 08:36:01PM -0800, Bryce Harrington wrote:
> On Mon, Dec 13, 2021 at 03:50:10PM +1300, Robert Ancell wrote:
> > Hi all,
> > 
> > I have a software-properties SRU [1] in bionic that has phasing stopped due
> > to an error [2].
> > 
> > The stack trace is showing the following (new) code is failing:
> > 
> >     di = distro_info.UbuntuDistroInfo()
> >     releases = di.get_all(result="object")
> > 
> > with the error:
> > 
> >     AttributeError: 'UbuntuDistroInfo' object has no attribute 'get_all'
> > 
> > This is very confusing, since the code from this (from the distro-info
> > library) is essentially:
> > 
> >     class DistroInfo:
> >         def get_all(self, result="codename"):
> >             ...
> > 
> >     class UbuntuDistroInfo(DistroInfo):
> >         def __init__(self):
> >             super().__init__("Ubuntu")
> > 
> > i.e. I can't see any reason why the `di` object would not have a get_all()
> > method. Running software-properties and various test scripts on a bionic VM
> > I haven't been able to reproduce any such issues.
> > 
> > Theories that have been proposed:
> > - The user is actually running an older version of disto-info that was from
> > before this method was added (in distro-info 0.15).
> >   - Seems unlikely since there are error cases in which the install was
> > done with a bionic image.
> > - The user has a locally installed version of distro-info.
> >   - Stacktraces shows the system installed version, the appropriate version
> > of the binary installed, no PYTHONPATH set.
> > - A .pyc is being used that doesn't match the source.
> >   - Since installs have been from bionic media, it seems impossible that an
> > older .pyc could be created.
> > - Other code has removed this method.
> >   - Method is being accessed immediately, no other code seen in source that
> > could do this.
> > - Memory corruption.
> >  - Too many cases for error to be random, not seeing other similar issues.
> > 
> > Does anyone have any ideas about what might be going on?
> 
> Could it be an old pip-installed version of distro-info?
> (C.f. LP: #1848829, #1874250)

This type of crash has come up before and it was always my thought that
it was an older pip-installed version of distro-info. For quite some
time the pypi version of distro-info was out of date and missing this
option.

--
Brian Murray

-- 
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel

Reply via email to