'PackageKitCache' object has no attribute '_dict' in aptBackend.py

Bug #415993 reported by starslights
178
This bug affects 24 people
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Binary package hint: kpackagekit

Error Type: <type 'exceptions.AttributeError'>
Error Value: 'PackageKitCache' object has no attribute '_dict'
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1966, in <module>
    main()
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1963, in main
    run(args, options.single)
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1925, in run
    backend.dispatcher(args)
  File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 632, in dispatcher
    self.dispatch_command(args[0], args[1:])
  File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 540, in dispatch_command
    self.get_updates(filters)
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 653, in get_updates
    for pkg in self._cache.getChanges():
  File : /usr/lib/python2.6/dist-packages/apt/cache.py, line 164, in getChanges
    for p in self:
  File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 196, in __iter__
    for pkgname in sorted(self._dict.keys()):

karmic alpha4 desktop on x86 64

kpackagekit 4.1.1.1

Related branches

affects: kpackagekit (Ubuntu) → packagekit (Ubuntu)
Revision history for this message
dn (nobled) wrote :

I have the same error, only with gpk-update-viewer on 32-bit Karmic.

description: updated
summary: - error on karmic desktop x86 64
+ 'PackageKitCache' object has no attribute '_dict' in aptBackend.py
Revision history for this message
Massimo (mtrento) wrote :

same error too while uptating.

Error Type: Error Value: 'PackageKitCache' object has no attribute '_dict' File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1966, in main() File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1963, in main run(args, options.single) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1925, in run backend.dispatcher(args) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 632, in dispatcher self.dispatch_command(args[0], args[1:]) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 540, in dispatch_command self.get_updates(filters) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 653, in get_updates for pkg in self._cache.getChanges(): File : /usr/lib/python2.6/dist-packages/apt/cache.py, line 164, in getChanges for p in self: File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 196, in __iter__ for pkgname in sorted(self._dict.keys()):

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Same error here. This happens any time a PackageKit frontend tries to load the cache, rendering it useless.

Changed in packagekit (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
BlCa (blca) wrote :

Isn't it related to this :

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following packages are BROKEN:
  python-apt
1 packages upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
Need to get 376kB of archives. After unpacking 4096B will be freed.
The following packages have unmet dependencies:
  python-apt: Breaks: packagekit-backend-apt (<= 0.4.8-0ubuntu4) but 0.4.8-0ubuntu4 is installed.
The following actions will resolve these dependencies:

Remove the following packages:
packagekit-backend-apt

Install the following packages:
packagekit-backend-smart [0.4.8-0ubuntu4 (karmic)]

Score is -250

Accept this solution? [Y/n/q/?] n

python-apt seems to have broken dependency to packagekit-backend-apt since yesterday's update.

Revision history for this message
Sebastian Heinlein (glatzor) wrote :

There was an internal API change in python-apt. A new version of python-apt has been uploaded with the corresponding breaks tag.

I already removed the corresponding code in upstream git repository.

Changed in packagekit (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
starslights (starslights) wrote :

well don't seem fixed, the karmic updated from jaunty have lost the kinit image and i have all OS reinstalled with kunbuntu karmic alpha4 64 bits.

The error stay :

Error Type: Error Value: 'PackageKitCache' object has no attribute '_dict' File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1966, in main() File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1963, in main run(args, options.single) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1925, in run backend.dispatcher(args) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 643, in dispatcher self.dispatch_command(args[0], args[1:]) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 540, in dispatch_command self.get_updates(filters) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 653, in get_updates for pkg in self._cache.getChanges(): File : /usr/lib/python2.6/dist-packages/apt/cache.py, line 164, in getChanges for p in self: File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 196, in __iter__ for pkgname in sorted(self._dict.keys()):

my best

Revision history for this message
Daniel (nowa-grafika) wrote :

Bug still stays, after BlCa workaround packagekit turn off with no error.

Revision history for this message
Rim (rimtotem) wrote :

Same error after updating a clean Alpha 4 Kubuntu. Also noting that editing software sources gives following error on attempt: "Invalid problem report- Apport KDE" saying "No such file or directory"

Details on packade manager error:

Error Type: Error Value: 'PackageKitCache' object has no attribute '_dict' File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1966, in main() File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1963, in main run(args, options.single) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1925, in run backend.dispatcher(args) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 643, in dispatcher self.dispatch_command(args[0], args[1:]) File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 540, in dispatch_command self.get_updates(filters) File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 653, in get_updates for pkg in self._cache.getChanges(): File : /usr/lib/python2.6/dist-packages/apt/cache.py, line 164, in getChanges for p in self: File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 196, in __iter__ for pkgname in sorted(self._dict.keys()):

Revision history for this message
Rim (rimtotem) wrote :

Just notised, i can't seem to install anything from deb packets since the above error occured. Did a smart upgrade via command line just now and no luck. It always gives following error: "Invalid problem report- Apport KDE" saying "No such file or directory".

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote :

I get the exact same error with every boot. At least once, usually twice, a little box pops up from Apport KDE saying "No such file or directory".

This is horribly busted and just keeps getting worse.

Revision history for this message
Toni Helenius (toni-helenius) wrote :

I can confirm what seasoned_geek just said (#10). Well, this is alpha :)

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 0.4.9+20090825-0ubuntu1

---------------
packagekit (0.4.9+20090825-0ubuntu1) karmic; urgency=low

  * New upstream snapshot provding a lot of APT backend improvements:
    - Allow to install updates which require the installation of additional
      packages. Updates depending on the removal of a package are still
      blocked (LP: #342671, LP: #374011, LP: #374011)
    - Warn about the installation of untrusted package (LP: #256245)
    - Don't crash in APT post update hook if system D-Bus daemon isn't
      running (LP: #388623)
    - Don't try to estimate a download progress during cache updating, since
      APT reports only a forth- and backwards running progress. (LP: #348053)
    - Support for python-apt 0.7.12 (LP: #415993)
    - Translated package descriptions
  * debian/patches:
    - Remove ignore_packages_in_conffile (Merged upstream)
    - Remove fix_typo (Merged upstream)
    - Add fix_unicode: Handle the encoding messages via stdin/stdout correctly
      (LP: #396513)
    - Add fix_unicode_debfile: Convert the path of the local file which
      should be installed to the correct encoding (LP: #347327)
  * debian/libpackagekit-qt-dev.install: Fix install location of CMake module.
    Thanks to Sveinung Kvilhaugsvik (LP: #345706)
  * debian/control: Fix spelling of Qt. Thanks to Sveinung Kvilhaugsvik
    (LP: #378419)

 -- Sebastian Heinlein <email address hidden> Tue, 25 Aug 2009 13:03:26 +0200

Changed in packagekit (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
starslights (starslights) wrote :

it's maybe a stupid question but now for almost 2 days was no update and yet no update for this fix.

It is while that's will update later and was no up this last days or my karmic don't update anymore?

Thanks in advance for a answer

my best

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

I have only been able to apply updates via Synaptic. KPackageKit just keeps
breaking more.

On Tuesday 25 August 2009 11:07:25 am starslights wrote:
> it's maybe a stupid question but now for almost 2 days was no update and
> yet no update for this fix.
>
> It is while that's will update later and was no up this last days or my
> karmic don't update anymore?
>
> Thanks in advance for a answer
>
> my best

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.logikalsolutions.com

Revision history for this message
Tuomas Aavikko (taavikko) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

2009/8/25 seasoned_geek <email address hidden>

> I have only been able to apply updates via Synaptic. KPackageKit just
> keeps
> breaking more.
>
> On Tuesday 25 August 2009 11:07:25 am starslights wrote:
> > it's maybe a stupid question but now for almost 2 days was no update and
> > yet no update for this fix.
>

The fix has been uploaded to repos, use "main server" to access it.
Then "sudo aptitude update && sudo aptitude full-upgrade"

kpackagekit is working correctly once more.

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

The "fix" is not visible to Synaptic. I just told Synaptic to mark all updates
and it marked nothing.

On Tuesday 25 August 2009 01:52:53 pm Tuomas Aavikko wrote:
> 2009/8/25 seasoned_geek <email address hidden>
>
> > I have only been able to apply updates via Synaptic. KPackageKit just
> > keeps
> > breaking more.
> >
> > On Tuesday 25 August 2009 11:07:25 am starslights wrote:
> > > it's maybe a stupid question but now for almost 2 days was no update
> > > and yet no update for this fix.
>
> The fix has been uploaded to repos, use "main server" to access it.
> Then "sudo aptitude update && sudo aptitude full-upgrade"
>
> kpackagekit is working correctly once more.

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.logikalsolutions.com

Revision history for this message
dn (nobled) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

Do you have Software Sources set to "Download from: Main server"? And
did you click the Reload button in Synaptic? Because that should make
sure the latest updates are showing.

On Tue, Aug 25, 2009 at 3:13 PM, seasoned_geek wrote:
> The "fix" is not visible to Synaptic.  I just told Synaptic to mark all updates
> and it marked nothing.

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

It is whatever the defaults are for Synaptic with the karmic Koala
installation. I have had this problem in the past with KPackageKit and other
fixes. There seems to be a problem with how things are rolled out. Each time
I file a bug about it the "fixes" show up in Synaptic roughly 4-5 hours later.

My guess is that there is some piece still done by hand which doesn't always
get done.

On Tuesday 25 August 2009 02:28:30 pm dn wrote:
> Do you have Software Sources set to "Download from: Main server"? And
> did you click the Reload button in Synaptic? Because that should make
> sure the latest updates are showing.
>
> On Tue, Aug 25, 2009 at 3:13 PM, seasoned_geek wrote:
> > The "fix" is not visible to Synaptic. I just told Synaptic to mark all
> > updates and it marked nothing.

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.logikalsolutions.com

Revision history for this message
Tuomas Aavikko (taavikko) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

2009/8/25 seasoned_geek <email address hidden>

> It is whatever the defaults are for Synaptic with the karmic Koala
> installation.

Then it defaults to your nearest local mirror, which can be out of sync
several days.
Use synaptics reposotories tab to switch to main server, if you must have it
now, otherwise wait till your local mirror get's synced.

mirrors: https://edge.launchpad.net/ubuntu/+archivemirrors

Revision history for this message
starslights (starslights) wrote :

Thanks so much, my source on "swiss server" .. i think it have done automatic while i have not change that.

Well now kpackagekit work fine.

Great work peoples :=)

my best

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py
Download full text (40.3 KiB)

I issued the instructions as provided and am a bit concerned by what I saw.
See the blue lines below. No, I didn't paste twice.

Preconfiguring packages ...
(Reading database ... 174395 files and directories currently installed.)
Removing gnome-mount ...
Removing libatasmart0 ...
Removing libdvbpsi4 ...
Removing policykit-gnome ...
Removing libpolkit-gnome0 ...
Removing libwv2-1c2 ...
Processing triggers for man-db ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 174332 files and directories currently installed.)
Preparing to replace python-apt 0.7.12.1ubuntu2 (using .../python-
apt_0.7.13.2ubuntu1_i386.deb) ...
Unpacking replacement python-apt ...
Preparing to replace gnome-app-install 0.5.52-0ubuntu1 (using .../gnome-app-
install_0.5.60.1_all.deb) ...
Unpacking replacement gnome-app-install ...
Processing triggers for doc-base ...
Processing 1 changed doc-base file(s)...
Registering documents with scrollkeeper...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
(Reading database ... 174253 files and directories currently installed.)
Removing python-launchpad-int...

Revision history for this message
Daniel (nowa-grafika) wrote :

Now all operations takes 0sek, can't check for updates or install/search new pakeg.

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote :

After having issued

sudo aptitude update && sudo aptitude full-upgrade

and rebooting, Konqueror has become the default browser and it takes forever to load.

Revision history for this message
Massimo (mtrento) wrote :

after the latest updates (aptitude full-upgrade) kpackagekit is working without errors
thanks dudes

Revision history for this message
Evandro Myller (emyller) wrote : Re: [Bug 415993] Re: 'PackageKitCache' object has no attribute '_dict' in aptBackend.py

Yea, the bug is gone, finally.

Btw, KPackageKit is so much better now.

On Fri, Aug 28, 2009 at 12:39 AM, Massimo <email address hidden> wrote:

> after the latest updates (aptitude full-upgrade) kpackagekit is working
> without errors
> thanks dudes
>
> --
> 'PackageKitCache' object has no attribute '_dict' in aptBackend.py
> https://bugs.launchpad.net/bugs/415993
> You received this bug notification because you are a direct subscriber
> of a duplicate bug.
>
> Status in “packagekit” package in Ubuntu: Fix Released
>
> Bug description:
> Binary package hint: kpackagekit
>
> Error Type: <type 'exceptions.AttributeError'>
> Error Value: 'PackageKitCache' object has no attribute '_dict'
> File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1966, in
> <module>
> main()
> File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1963, in main
> run(args, options.single)
> File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 1925, in run
> backend.dispatcher(args)
> File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 632,
> in dispatcher
> self.dispatch_command(args[0], args[1:])
> File : /usr/lib/python2.6/dist-packages/packagekit/backend.py, line 540,
> in dispatch_command
> self.get_updates(filters)
> File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 653, in
> get_updates
> for pkg in self._cache.getChanges():
> File : /usr/lib/python2.6/dist-packages/apt/cache.py, line 164, in
> getChanges
> for p in self:
> File : /usr/share/PackageKit/helpers/apt/aptBackend.py, line 196, in
> __iter__
> for pkgname in sorted(self._dict.keys()):
>
>
> karmic alpha4 desktop on x86 64
>
> kpackagekit 4.1.1.1
>

--
E. Myller
Front-end engineer / architect
http://emyller.net/

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.