Traceback from update-apt-xapian-index

Bug #1526267 reported by dino99 on 2015-12-15
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
High
Barry Warsaw

Bug Description

Sometimes, but not all the time, /usr/sbin/update-apt-xapian-index when called from synaptic can produce a traceback. An exact reproducer is not yet available.

dino99 (9d9) wrote :
description: updated
tags: added: apport-collected xenial
description: updated
dino99 (9d9) wrote : Dependencies.txt

apport information

apport information

dino99 (9d9) wrote : ProcEnviron.txt

apport information

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt-xapian-index (Ubuntu):
status: New → Confirmed

root@xubuntu:/tmp# update-apt-xapian-index --update
ERROR:root:DebFileApplication import
Traceback (most recent call last):
  File "/usr/share/software-center/softwarecenter/db/__init__.py", line 4, in <module>
    from debfile import DebFileApplication, DebFileOpenError
ImportError: No module named 'debfile'
Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 104, in <module>
    if not indexer.setupIndexing(force=opts.force, system=opts.pkgfile is None):
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 474, in setupIndexing
    self.plugins = Plugins(progress=self.progress, system=system)
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 98, in __init__
    addon = Addon(fullname, **kw)
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 53, in __init__
    self.module = imp.load_source("axi.plugin_" + self.name, fname)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/usr/share/apt-xapian-index/plugins/software_center.py", line 13, in <module>
    from softwarecenter.db.update import (
  File "/usr/share/software-center/softwarecenter/db/update.py", line 33, in <module>
    from softwarecenter.backend.scagent import SoftwareCenterAgent
  File "/usr/share/software-center/softwarecenter/backend/scagent.py", line 26, in <module>
    from spawn_helper import SpawnHelper
ImportError: No module named 'spawn_helper'

ok so the solution is to purge software-center from your system
after which you will see this error

root@xubuntu:/tmp# update-apt-xapian-index --update
Reading .desktop files from /usr/share/app-install/desktop/: done.
Reading Xapian index... 0%Traceback (most recent call last):
  File "/usr/sbin/update-apt-xapian-index", line 109, in <module>
    indexer.incrementalUpdate()
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 703, in incrementalUpdate
    self.updateIndex(dbpath)
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 666, in updateIndex
    unchanged, outdated, obsolete = self.compareCacheToDb(cache, db)
  File "/usr/lib/python3/dist-packages/axi/indexer.py", line 633, in compareCacheToDb
    if not cache.has_key(pkg) or not cache[pkg].candidate:
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 238, in has_key
    return key in self
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 242, in __contains__
    return self.__is_real_pkg(self._cache[key])
TypeError: Expected a string or a pair of strings

Changed in software-center (Ubuntu):
status: New → Confirmed
Changed in synaptic (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in software-center (Ubuntu):
importance: Undecided → High
Changed in apt-xapian-index (Ubuntu):
importance: Undecided → High
Iain Lane (laney) wrote :

This is fixed with the new software-center and apt-xapian-index, right?

dino99 (9d9) wrote :

@lain

'proposed' activated; system uptodate
softwre-center 13.10-0ubuntu13 & apt-xapian-index 0.47ubuntu4 on a 64 bits xenial

after setting /var/crash/* empty, im able to still get a crash by:
- closing synaptic
- reopening it then hit 'reload' icon

here is the crash file i get

dino99 (9d9) wrote :

crash file

Barry Warsaw (barry) wrote :

The original report is indeed fixed in s-c 13.10-0ubuntu13. The crash file in #10 shows a new traceback in apt-xapian-index.

no longer affects: software-center (Ubuntu)
no longer affects: synaptic (Ubuntu)
summary: - .../softwarecenter/backend/scagent.py : no module named "spawn_helper"
+ Traceback from update-apt-xapian-index
Changed in apt-xapian-index (Ubuntu):
assignee: nobody → Barry Warsaw (barry)
description: updated
Barry Warsaw (barry) wrote :

If you run synaptic a second time, or run `sudo /usr/sbin/update-apt-xapian-index` from the command line, do you still get the exception?

Barry Warsaw (barry) wrote :

Reproducer:

sudo /usr/sbin/update-apt-xapian-index --force --update

I know what the bug is.

Changed in apt-xapian-index (Ubuntu):
status: Confirmed → In Progress
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-xapian-index - 0.47ubuntu5

---------------
apt-xapian-index (0.47ubuntu5) xenial; urgency=medium

  * debian/patches/04_bilingual.patch: When using --force --update on
    update-apt-xapian-index, be sure package names passed to python3-apt
    are strings, not bytes. (LP: #1526267)

 -- Barry Warsaw <email address hidden> Wed, 16 Dec 2015 14:12:44 -0500

Changed in apt-xapian-index (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers