apt-p2p error with python2.7

Project:Trisquel
Version:7.0
Component:Packages
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

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
runApp(config)
File "/usr/lib/python2.7/dist-packages/twisted/scripts/twistd.py", line 23, in runApp
_SomeApplicationRunner(config).run()
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

.
ramiro@estacion1:~$

Mon, 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
Reemplace:
from apt.progress.old import OpProgress
with:
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.

Mon, 10/27/2014 - 00:07
Status:active» patch (needs review)
Thu, 05/14/2015 - 15:26
Status:patch (needs review)» patch (ready)

Merge request created here:

https://devel.trisquel.info/trisquel/package-helpers/merge_requests/92

Sun, 05/31/2015 - 12:27
Status:patch (ready)» fixed

Merged and building.

Sat, 06/13/2015 - 21:26
Status:fixed» active

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