Traceback from update-apt-xapian-index

Bug #1526267 reported by dino99
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
apt-xapian-index (Ubuntu)
Fix Released
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.

Revision history for this message
dino99 (9d9) wrote :
description: updated
tags: added: apport-collected xenial
description: updated
Revision history for this message
dino99 (9d9) wrote : Dependencies.txt

apport information

Revision history for this message
dino99 (9d9) wrote : JournalErrors.txt

apport information

Revision history for this message
dino99 (9d9) wrote : ProcEnviron.txt

apport information

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: .../softwarecenter/backend/scagent.py : no module named "spawn_helper"

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

Changed in apt-xapian-index (Ubuntu):
status: New → Confirmed
Revision history for this message
Jeffery Wilkins (djcanadianjeff) wrote :

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'

Revision history for this message
Jeffery Wilkins (djcanadianjeff) wrote :

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
Revision history for this message
Iain Lane (laney) wrote :

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

Revision history for this message
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

Revision history for this message
dino99 (9d9) wrote :

crash file

Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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
Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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