Update manager in Ubuntu 12.10 will not start

Asked by Rafał Sikora

When I click Update Manager icon in dash nothing happens. After trying to run it in terminal I get the following error:

administrator@rafal:~$ sudo update-manager
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
EOFError: EOF read where not expected
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 64, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 4, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 20, in <module>
    import apt
EOFError: EOF read where not expected

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 28, in <module>
    from gi.repository import Gtk
EOFError: EOF read where not expected

There is one more thing that I think is connected with the above. I can run Software Centre no problem, but after I choose an application to install and press the install button, the installation process does not start. On the other hand, I can install apps using apt-get install in terminal.
I tried to find a sollution to the problem on Polish and English forums but either nothing helped or there was no information.
The issue occured only after upgrading from 12.04 to 12.10.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu update-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you run:

sudo apt-get update; sudo apt-get upgrade; sudo apt-get dist-upgrade

Does it upgrade ok?

Revision history for this message
Rafał Sikora (sikoraraf) said :
#2

Yes, it does. But it still doesn't solve the issue.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Try:

sudo apt-get --reinstall install python3 software-center

Then try:

gksudo update-manager

You don't use sudo with GUI apps and gksudo should be used. Sudo is only for CLI commands like apt-get, mv, cp etc.

Revision history for this message
Rafał Sikora (sikoraraf) said :
#4

Nope, nothing. softare centre reinstalled. The second command gave nothing. Software centre still doesn't install apps.

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

Try

sudo apt-get install --reinstall python3-gi

Revision history for this message
Rafał Sikora (sikoraraf) said :
#6

Still no effect...

Revision history for this message
Manfred Hampl (m-hampl) said :
#7

To find out more about your system and to hopefully identify the root cause of your problem please issue these commands in a terminal (ctrl-alt-t):

lsb_release -a
uname -a
which python
python --version
python -c 'from gi.repository import Gtk'
cat /usr/shard/pyshared/gi/repository/__init__.py
cat /usr/lib/python2.7/dist-packages/gi/repository/__init__.py
cat /usr/lib/python3/dist-packages/gi/repository/__init__.py
cat /usr/lib/python3/dist-packages/gi/overrides/Gtk.py
dpkg -l | grep -e -gi

Then select all output (edit - select all), copy it (edit - copy) and paste into a new message of this question thread.

Revision history for this message
Rafał Sikora (sikoraraf) said :
#8

            start, stop, step = key.indices(self.model.get_n_columns())
            alist = []
            for i in range(start, stop, step):
                alist.append(self.model.get_value(self.iter, i))
            return alist
        else:
            raise TypeError("indices must be integers, not %s" % type(key).__name__)

    def __setitem__(self, key, value):
        if isinstance(key, int):
            if key >= self.model.get_n_columns():
                raise IndexError("column index is out of bounds: %d" % key)
            elif key < 0:
                key = self._convert_negative_index(key)
            self.model.set_value(self.iter, key, value)
        elif isinstance(key, slice):
            start, stop, step = key.indices(self.model.get_n_columns())
            indexList = range(start, stop, step)
            if len(indexList) != len(value):
                raise ValueError(
                    "attempt to assign sequence of size %d to slice of size %d"
                    % (len(value), len(indexList)))

            for i, v in enumerate(indexList):
                self.model.set_value(self.iter, v, value[i])
        else:
            raise TypeError("index must be an integer or slice, not %s" % type(key).__name__)

    def _convert_negative_index(self, index):
        new_index = self.model.get_n_columns() + index
        if new_index < 0:
            raise IndexError("column index is out of bounds: %d" % index)
        return new_index

    def iterchildren(self):
        child_iter = self.model.iter_children(self.iter)
        return TreeModelRowIter(self.model, child_iter)

__all__.append('TreeModelRow')

class TreeModelRowIter(object):

    def __init__(self, model, aiter):
        self.model = model
        self.iter = aiter

    def __next__(self):
        if not self.iter:
            raise StopIteration
        row = TreeModelRow(self.model, self.iter)
        self.iter = self.model.iter_next(self.iter)
        return row

    # alias for Python 2.x object protocol
    next = __next__

    def __iter__(self):
        return self

__all__.append('TreeModelRowIter')

class TreePath(Gtk.TreePath):

    def __new__(cls, path=0):
        if isinstance(path, int):
            path = str(path)
        elif isinstance(path, tuple):
            path = ":".join(str(val) for val in path)

        if len(path) == 0:
            raise TypeError("could not parse subscript '%s' as a tree path" % path)
        try:
            return TreePath.new_from_string(path)
        except TypeError:
            raise TypeError("could not parse subscript '%s' as a tree path" % path)

    def __str__(self):
        return self.to_string()

    def __lt__(self, other):
        return not other is None and self.compare(other) < 0

    def __le__(self, other):
        return not other is None and self.compare(other) <= 0

    def __eq__(self, other):
        return not other is None and self.compare(other) == 0

    def __ne__(self, other):
        return other is None or self.compare(other) != 0

    def __gt__(self, other):
        return other is None or self.compare(other) > 0

    def __ge__(self, other):
        return other is None or self.compare(other) >= 0

    def __iter__(self):
        return iter(self.get_indices())

    def __len__(self):
        return self.get_depth()

    def __getitem__(self, index):
        return self.get_indices()[index]

TreePath = override(TreePath)
__all__.append('TreePath')

class TreeStore(Gtk.TreeStore, TreeModel, TreeSortable):

    def __init__(self, *column_types):
        Gtk.TreeStore.__init__(self)
        self.set_column_types(column_types)

    def _do_insert(self, parent, position, row):
        if row is not None:
            row, columns = self._convert_row(row)
            treeiter = self.insert_with_values(parent, position, columns, row)
        else:
            treeiter = Gtk.TreeStore.insert(self, parent, position)

        return treeiter

    def append(self, parent, row=None):
        return self._do_insert(parent, -1, row)

    def prepend(self, parent, row=None):
        return self._do_insert(parent, 0, row)

    def insert(self, parent, position, row=None):
        return self._do_insert(parent, position, row)

    # FIXME: sends two signals; check if this can use an atomic
    # insert_with_valuesv()

    def insert_before(self, parent, sibling, row=None):
        treeiter = Gtk.TreeStore.insert_before(self, parent, sibling)

        if row is not None:
            self.set_row(treeiter, row)

        return treeiter

    # FIXME: sends two signals; check if this can use an atomic
    # insert_with_valuesv()

    def insert_after(self, parent, sibling, row=None):
        treeiter = Gtk.TreeStore.insert_after(self, parent, sibling)

        if row is not None:
            self.set_row(treeiter, row)

        return treeiter

    def set_value(self, treeiter, column, value):
        value = self._convert_value(column, value)
        Gtk.TreeStore.set_value(self, treeiter, column, value)

    def set(self, treeiter, *args):

        def _set_lists(columns, values):
            if len(columns) != len(values):
                raise TypeError('The number of columns do not match the number of values')
            for col_num, val in zip(columns, values):
                if not isinstance(col_num, int):
                    raise TypeError('TypeError: Expected integer argument for column.')
                self.set_value(treeiter, col_num, val)

        if args:
            if isinstance(args[0], int):
                columns = args[::2]
                values = args[1::2]
                _set_lists(columns, values)
            elif isinstance(args[0], (tuple, list)):
                if len(args) != 2:
                    raise TypeError('Too many arguments')
                _set_lists(args[0], args[1])
            elif isinstance(args[0], dict):
                columns = args[0].keys()
                values = args[0].values()
                _set_lists(columns, values)
            else:
                raise TypeError('Argument list must be in the form of (column, value, ...), ((columns,...), (values, ...)) or {column: value}. No -1 termination is needed.')

TreeStore = override(TreeStore)
__all__.append('TreeStore')

class TreeView(Gtk.TreeView, Container):

    def __init__(self, model=None):
        Gtk.TreeView.__init__(self)
        if model:
            self.set_model(model)

    def get_path_at_pos(self, x, y):
        success, path, column, cell_x, cell_y = super(TreeView, self).get_path_at_pos(x, y)
        if success:
            return (path, column, cell_x, cell_y,)

    def get_visible_range(self):
        success, start_path, end_path = super(TreeView, self).get_visible_range()
        if success:
            return (start_path, end_path,)

    def get_dest_row_at_pos(self, drag_x, drag_y):
        success, path, pos = super(TreeView, self).get_dest_row_at_pos(drag_x, drag_y)
        if success:
            return (path, pos,)

    def _construct_target_list(self, targets):
        # FIXME: this should most likely be part of Widget or a global helper
        # function
        target_entries = []
        for t in targets:
            entry = Gtk.TargetEntry.new(*t)
            target_entries.append(entry)
        return target_entries

    def enable_model_drag_source(self, start_button_mask, targets, actions):
        target_entries = self._construct_target_list(targets)
        super(TreeView, self).enable_model_drag_source(start_button_mask,
                                                       target_entries,
                                                       actions)

    def enable_model_drag_dest(self, targets, actions):
        target_entries = self._construct_target_list(targets)
        super(TreeView, self).enable_model_drag_dest(target_entries,
                                                     actions)

    def scroll_to_cell(self, path, column=None, use_align=False, row_align=0.0, col_align=0.0):
        if not isinstance(path, Gtk.TreePath):
            path = TreePath(path)
        super(TreeView, self).scroll_to_cell(path, column, use_align, row_align, col_align)

    def set_cursor(self, path, column=None, start_editing=False):
        if not isinstance(path, Gtk.TreePath):
            path = TreePath(path)
        super(TreeView, self).set_cursor(path, column, start_editing)

    def get_cell_area(self, path, column=None):
        if not isinstance(path, Gtk.TreePath):
            path = TreePath(path)
        return super(TreeView, self).get_cell_area(path, column)

    def insert_column_with_attributes(self, position, title, cell, **kwargs):
        column = TreeViewColumn()
        column.set_title(title)
        column.pack_start(cell, False)
        self.insert_column(column, position)
        column.set_attributes(cell, **kwargs)

TreeView = override(TreeView)
__all__.append('TreeView')

class TreeViewColumn(Gtk.TreeViewColumn):
    def __init__(self, title='',
                 cell_renderer=None,
                 **attributes):
        Gtk.TreeViewColumn.__init__(self, title=title)
        if cell_renderer:
            self.pack_start(cell_renderer, True)

        for (name, value) in attributes.items():
            self.add_attribute(cell_renderer, name, value)

    def cell_get_position(self, cell_renderer):
        success, start_pos, width = super(TreeViewColumn, self).cell_get_position(cell_renderer)
        if success:
            return (start_pos, width,)

    def set_cell_data_func(self, cell_renderer, func, func_data=None):
        super(TreeViewColumn, self).set_cell_data_func(cell_renderer, func, func_data)

    def set_attributes(self, cell_renderer, **attributes):
        Gtk.CellLayout.clear_attributes(self, cell_renderer)

        for (name, value) in attributes.items():
            Gtk.CellLayout.add_attribute(self, cell_renderer, name, value)

TreeViewColumn = override(TreeViewColumn)
__all__.append('TreeViewColumn')

class TreeSelection(Gtk.TreeSelection):

    def select_path(self, path):
        if not isinstance(path, Gtk.TreePath):
            path = TreePath(path)
        super(TreeSelection, self).select_path(path)

    def get_selected(self):
        success, model, aiter = super(TreeSelection, self).get_selected()
        if success:
            return (model, aiter)
        else:
            return (model, None)

    # for compatibility with PyGtk

    def get_selected_rows(self):
        rows, model = super(TreeSelection, self).get_selected_rows()
        return (model, rows)

TreeSelection = override(TreeSelection)
__all__.append('TreeSelection')

class Button(Gtk.Button, Container):
    def __init__(self, label=None, stock=None, use_stock=False, use_underline=False, **kwds):
        if stock:
            label = stock
            use_stock = True
            use_underline = True
        Gtk.Button.__init__(self, label=label, use_stock=use_stock,
                            use_underline=use_underline, **kwds)
Button = override(Button)
__all__.append('Button')

class LinkButton(Gtk.LinkButton):
    def __init__(self, uri, label=None, **kwds):
        Gtk.LinkButton.__init__(self, uri=uri, label=label, **kwds)

LinkButton = override(LinkButton)
__all__.append('LinkButton')

class Label(Gtk.Label):
    def __init__(self, label=None, **kwds):
        Gtk.Label.__init__(self, label=label, **kwds)

Label = override(Label)
__all__.append('Label')

class Adjustment(Gtk.Adjustment):
    def __init__(self, *args, **kwds):
        arg_names = ('value', 'lower', 'upper',
                     'step_increment', 'page_increment', 'page_size')
        new_args = dict(zip(arg_names, args))
        new_args.update(kwds)

        # PyGTK compatiblity
        if 'page_incr' in new_args:
            new_args['page_increment'] = new_args.pop('page_incr')
        if 'step_incr' in new_args:
            new_args['step_increment'] = new_args.pop('step_incr')
        Gtk.Adjustment.__init__(self, **new_args)

        # The value property is set between lower and (upper - page_size).
        # Just in case lower, upper or page_size was still 0 when value
        # was set, we set it again here.
        if 'value' in new_args:
            self.set_value(new_args['value'])

Adjustment = override(Adjustment)
__all__.append('Adjustment')

class Table(Gtk.Table, Container):
    def __init__(self, rows=1, columns=1, homogeneous=False, **kwds):
        if 'n_rows' in kwds:
            rows = kwds.pop('n_rows')

        if 'n_columns' in kwds:
            columns = kwds.pop('n_columns')

        Gtk.Table.__init__(self, n_rows=rows, n_columns=columns, homogeneous=homogeneous, **kwds)

    def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND | Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
        Gtk.Table.attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions, yoptions, xpadding, ypadding)

Table = override(Table)
__all__.append('Table')

class ScrolledWindow(Gtk.ScrolledWindow):
    def __init__(self, hadjustment=None, vadjustment=None, **kwds):
        Gtk.ScrolledWindow.__init__(self, hadjustment=hadjustment, vadjustment=vadjustment, **kwds)

ScrolledWindow = override(ScrolledWindow)
__all__.append('ScrolledWindow')

class HScrollbar(Gtk.HScrollbar):
    def __init__(self, adjustment=None, **kwds):
        Gtk.HScrollbar.__init__(self, adjustment=adjustment, **kwds)

HScrollbar = override(HScrollbar)
__all__.append('HScrollbar')

class VScrollbar(Gtk.VScrollbar):
    def __init__(self, adjustment=None, **kwds):
        Gtk.VScrollbar.__init__(self, adjustment=adjustment, **kwds)

VScrollbar = override(VScrollbar)
__all__.append('VScrollbar')

class Paned(Gtk.Paned):
    def pack1(self, child, resize=False, shrink=True):
        super(Paned, self).pack1(child, resize, shrink)

    def pack2(self, child, resize=True, shrink=True):
        super(Paned, self).pack2(child, resize, shrink)

Paned = override(Paned)
__all__.append('Paned')

class Arrow(Gtk.Arrow):
    def __init__(self, arrow_type, shadow_type, **kwds):
        Gtk.Arrow.__init__(self, arrow_type=arrow_type,
                           shadow_type=shadow_type,
                           **kwds)

Arrow = override(Arrow)
__all__.append('Arrow')

class IconSet(Gtk.IconSet):
    def __new__(cls, pixbuf=None):
        if pixbuf is not None:
            iconset = Gtk.IconSet.new_from_pixbuf(pixbuf)
        else:
            iconset = Gtk.IconSet.__new__(cls)
        return iconset

IconSet = override(IconSet)
__all__.append('IconSet')

class Viewport(Gtk.Viewport):
    def __init__(self, hadjustment=None, vadjustment=None, **kwds):
        Gtk.Viewport.__init__(self, hadjustment=hadjustment,
                              vadjustment=vadjustment,
                              **kwds)

Viewport = override(Viewport)
__all__.append('Viewport')

class TreeModelFilter(Gtk.TreeModelFilter):
    def set_visible_func(self, func, data=None):
        super(TreeModelFilter, self).set_visible_func(func, data)

TreeModelFilter = override(TreeModelFilter)
__all__.append('TreeModelFilter')

if Gtk._version != '2.0':
    class Menu(Gtk.Menu):
        def popup(self, parent_menu_shell, parent_menu_item, func, data, button, activate_time):
            self.popup_for_device(None, parent_menu_shell, parent_menu_item, func, data, button, activate_time)
    Menu = override(Menu)
    __all__.append('Menu')

_Gtk_main_quit = Gtk.main_quit

@override(Gtk.main_quit)
def main_quit(*args):
    _Gtk_main_quit()

_Gtk_stock_lookup = Gtk.stock_lookup

@override(Gtk.stock_lookup)
def stock_lookup(*args):
    success, item = _Gtk_stock_lookup(*args)
    if not success:
        return None

    return item

initialized, argv = Gtk.init_check(sys.argv)
sys.argv = list(argv)
if not initialized:
    raise RuntimeError("Gtk couldn't be initialized")
administrator@rafal:~$ dpkg -l | grep -e -gi
ii python-gi 3.4.0-1 i386 Python 2.x bindings for gobject-introspection libraries
ii python-gi-cairo 3.4.0-1 i386 Python Cairo bindings for the GObject library
ii python3-gi 3.4.0-1 i386 Python 3 bindings for gobject-introspection libraries
ii python3-gi-cairo 3.4.0-1 i386 Python 3 Cairo bindings for the GObject library
administrator@rafal:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#9

Unfortunately the output of one of the commands was so long, that the output was cut off and is incomplete.

Please try again these commands:

cat /usr/share/pyshared/gi/repository/__init__.py
cat /usr/lib/python2.7/dist-packages/gi/repository/__init__.py
cat /usr/lib/python3/dist-packages/gi/repository/__init__.py
lsb_release -a
uname -a
which python
python --version
python -c 'from gi.repository import Gtk'

and copy/paste the output as done before.

Revision history for this message
Rafał Sikora (sikoraraf) said :
#10

administrator@rafal:~$ cat /usr/share/pyshared/gi/repository/__init__.py
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2009 Johan Dahlin <email address hidden>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA

from __future__ import absolute_import

import sys

from ..importer import DynamicImporter

sys.meta_path.append(DynamicImporter('gi.repository'))

del DynamicImporter
del sys
administrator@rafal:~$ cat /usr/lib/python2.7/dist-packages/gi/repository/__init__.py
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2009 Johan Dahlin <email address hidden>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA

from __future__ import absolute_import

import sys

from ..importer import DynamicImporter

sys.meta_path.append(DynamicImporter('gi.repository'))

del DynamicImporter
del sys
administrator@rafal:~$ cat /usr/lib/python3/dist-packages/gi/repository/__init__.py
# -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2009 Johan Dahlin <email address hidden>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
# USA

from __future__ import absolute_import

import sys

from ..importer import DynamicImporter

sys.meta_path.append(DynamicImporter('gi.repository'))

del DynamicImporter
del sys
administrator@rafal:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.10
Release: 12.10
Codename: quantal
administrator@rafal:~$ uname -a
Linux rafal 3.5.0-18-generic #29-Ubuntu SMP Fri Oct 19 10:27:31 UTC 2012 i686 i686 i686 GNU/Linux
administrator@rafal:~$ which python
/usr/bin/python
administrator@rafal:~$ python --version
Python 2.7.3
administrator@rafal:~$ python -c 'from gi.repository import Gtk'
administrator@rafal:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#11

That looks good.
The original error message
"Original exception was:
 Traceback (most recent call last):
   File "/usr/bin/update-manager", line 28, in <module>
     from gi.repository import Gtk
 EOFError: EOF read where not expected"
is not shown any more when manually doing the step where update-manager failed.

Now try opening a terminal window (ctrl-alt-t) and issue the command

sudo update-manager

What is the result?
If there is an error message please copy/paste all output.

Revision history for this message
Rafał Sikora (sikoraraf) said :
#12

administrator@rafal:~$ sudo update-manager
[sudo] password for administrator:
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 37, in <module>
    from UpdateManager.UpdateManager import UpdateManager
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 55, in <module>
    from .UpdatesAvailable import UpdatesAvailable
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdatesAvailable.py", line 62, in <module>
    from DistUpgrade.DistUpgradeCache import NotEnoughFreeSpaceError
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeCache.py", line 26, in <module>
    import apt
EOFError: EOF read where not expected

This is what I'm getting

Revision history for this message
Manfred Hampl (m-hampl) said :
#13

That is a slightly different error message now.

try

sudo apt-get install --reinstall python-apt python3-apt
sudo update-manager

and then again copy/paste all output

Revision history for this message
Rafał Sikora (sikoraraf) said :
#14

administrator@rafal:~$ sudo apt-get install --reinstall python-apt python3-apt
[sudo] password for administrator:
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności
Odczyt informacji o stanie... Gotowe
0 aktualizowanych, 0 nowo instalowanych, 2 ponownie instalowanych, 0 usuwanych i 1 nieaktualizowanych.
Konieczne pobranie 359 kB archiwów.
Po tej operacji zostanie dodatkowo użyte 0 B miejsca na dysku.
Pobieranie:1 http://pl.archive.ubuntu.com/ubuntu/ quantal/main python3-apt i386 0.8.7ubuntu4 [174 kB]
Pobieranie:2 http://pl.archive.ubuntu.com/ubuntu/ quantal/main python-apt i386 0.8.7ubuntu4 [186 kB]
Pobrano 359 kB w 0s (791 kB/s)
(Odczytywanie bazy danych ... 301445 plików i katalogów obecnie zainstalowanych.)
Przygotowywanie do zastąpienia pakietu python3-apt 0.8.7ubuntu4 (wykorzystując .../python3-apt_0.8.7ubuntu4_i386.deb) ...
Rozpakowywanie pakietu zastępującego python3-apt ...
Przygotowywanie do zastąpienia pakietu python-apt 0.8.7ubuntu4 (wykorzystując .../python-apt_0.8.7ubuntu4_i386.deb) ...
Rozpakowywanie pakietu zastępującego python-apt ...
Konfigurowanie pakietu python3-apt (0.8.7ubuntu4) ...
Konfigurowanie pakietu python-apt (0.8.7ubuntu4) ...
administrator@rafal:~$ sudo update-manager
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 115, in <module>
    app.start_update()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 164, in start_update
    self._start_pane(UpdateProgress(self))
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateProgress.py", line 56, in __init__
    self.install_backend = get_backend(self.datadir, self.window_main)
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 51, in get_backend
    from .InstallBackendAptdaemon import InstallBackendAptdaemon
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 11, in <module>
    from aptdaemon import client, errors
EOFError: EOF read where not expected
administrator@rafal:~$

Revision history for this message
Manfred Hampl (m-hampl) said :
#15

As you can see, the error message changed again, now failing in another Python module.
I guess the command
sudo apt-get install --reinstall aptdaemon
will repair this one. When you then again try
sudo update-manager
you will see whether it works, or if it fails somewhere else. Please copy/paste all output as done before.

I am quite sure, that doing this process (try update-manager, check the error message for the python module that fails, identify the package that provides that module, reinstall that package) sooner or later will lead to the situation that update-manager works again.

This, however, is more curing the symptoms than really going down to the root cause.

One possible cause for the whole issue is a file system problem. I recommend executing a file system check on your disks.

Revision history for this message
Rafał Sikora (sikoraraf) said :
#16

As you said the message changed. Now it looks like this:

administrator@rafal:~$ sudo update-manager
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 115, in <module>
    app.start_update()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 164, in start_update
    self._start_pane(UpdateProgress(self))
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateProgress.py", line 56, in __init__
    self.install_backend = get_backend(self.datadir, self.window_main)
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/__init__.py", line 51, in get_backend
    from .InstallBackendAptdaemon import InstallBackendAptdaemon
  File "/usr/lib/python3/dist-packages/UpdateManager/backend/InstallBackendAptdaemon.py", line 11, in <module>
    from aptdaemon import client, errors
EOFError: EOF read where not expected

Revision history for this message
Manfred Hampl (m-hampl) said :
#17

Do you still get the identical error ("update-manager line 115, ... from aptdaemon import client, errors ... EOFError") after doing

sudo apt-get install --reinstall aptdaemon
sudo update-manager

Revision history for this message
Rafał Sikora (sikoraraf) said :
#18

Yes, the error didn't change this time.

Revision history for this message
Manfred Hampl (m-hampl) said :
#19

try

sudo apt-get install --reinstall python-aptdaemon
sudo update-manager

Revision history for this message
Rafał Sikora (sikoraraf) said :
#20

Still the same error...

Revision history for this message
Manfred Hampl (m-hampl) said :
#21

Is the error message still identical - up to the last character?
The key information is in the last two lines.

Are the last to lines still
"from aptdaemon import client, errors
EOFError: EOF read where not expected" ?

Please try

python -c 'from aptdaemon import client, errors'

and copy/paste all output

Revision history for this message
Launchpad Janitor (janitor) said :
#22

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.

Revision history for this message
Marcin Dylewski (marcin-dylewski-m) said :
#23

Hey guys. I get *exactly* the same traceback. When I issue python -c 'from aptdaemon import client, errors' nothing happens.

marcin@dylux-think:~$ python -c 'from aptdaemon import client, errors'
marcin@dylux-think:~$

Revision history for this message
Marcin Dylewski (marcin-dylewski-m) said :
#24

OK. I've found a way to make it work. Just removed all *pyc files under /usr/lib/python3/dist-packages/ directory and that solved the issue. :)

Revision history for this message
Manfred Hampl (m-hampl) said :
#25

@marcin: the command "python -c 'from aptdaemon import client, errors'" should not produce any output. Only if something is wrong you will see error messages with the traceback of the calling modules.

Revision history for this message
Danny (danny-e) said :
#26

For those who had the same problem.

The fix for me was

deleting all the *pyc in
/usr/lib/python3/dist-packages/__pycache__

and then
sudo apt-get install --reinstall python3-gi

Wish i found this topic earlier this crash for like 6months and nothing worked for me what they said on other topics on the internet.

Revision history for this message
Justin Warkentin (cosmonrd) said :
#27

For those that find this in the future, here was what did the magic for me (based on the solution from Marcin Dylewski above):

sudo rm `find /usr/lib/python3/dist-packages/ -name *.pyc`

After that it worked like a charm. Enjoy!