apt-p2p error with python2.7

Catégorie:Rapporter un bogue
Attribué:Non assigné

Error on installation of apt-p2p or its reconfiguration:

ramiro@estacion1:~$ sudo dpkg-reconfigure apt-p2p
Stopping apt-p2p.
Starting apt-p2pUnhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 642, in run
File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 376, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 441, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/application/app.py", line 452, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.7/dist-packages/twisted/application/service.py", line 405, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.7/dist-packages/twisted/persisted/sob.py", line 210, in loadValueFromFile
exec fileObj in d, d
File "/usr/sbin/apt-p2p", line 73, in
from apt_p2p.apt_p2p import AptP2P
File "/usr/lib/pymodules/python2.7/apt_p2p/apt_p2p.py", line 19, in
from MirrorManager import MirrorManager
File "/usr/lib/pymodules/python2.7/apt_p2p/MirrorManager.py", line 16, in
from AptPackages import AptPackages
File "/usr/lib/pymodules/python2.7/apt_p2p/AptPackages.py", line 40, in
from apt.progress.old import OpProgress
exceptions.ImportError: No module named old

Failed to load application: No module named old


lun, 10/27/2014 - 00:06

I could solve the problem by doing the following:

sudo gedit /usr/lib/pymodules/python2.7/apt_p2p/AptPackages.py
from apt.progress.old import OpProgress
from apt.progress.base import OpProgress
Restart apt-p2p with:
sudo service apt-p2p restart

I have not tested it with other machines. But aparently, the problem has stopped because no error pops up on restart.

lun, 10/27/2014 - 00:07
Statut:active» patch (needs review)
mer, 05/13/2015 - 22:18
mer, 05/13/2015 - 22:23

quiliro's patch works (Trisquel 7, 64 bit).

jeu, 05/14/2015 - 15:26
Statut:patch (needs review)» patch (ready)

Merge request created here:


dim, 05/31/2015 - 12:27
Statut:patch (ready)» fixed

Merged and building.

Sam, 06/13/2015 - 21:26
Statut:fixed» active

My patch makes aptp2p start. But it will not download packages from peers.