Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After deleting a ppa entry in the sources.list file, I was not able to open the software sources application. Opening the software centre is fine. I tried running gksudo software-properties-gtk and got the follwong message:

 SoftwareProperties.__init__(self, options=options, datadir=datadir)
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 580, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python2.7/dist-packages/aptsources/distro.py", line 91, in get_sources
    raise NoDistroTemplateException("Error: could not find a "
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template

Would appreciate if you can let me know how to solve this problem.

share|improve this question

1 Answer 1

Quick thing to do is remove and reinstall

sudo apt-get update

sudo apt-get remove --purge software-properties-gtk

sudo apt-get install software-properties-gtk

The next thing I would do if that didn't work:

Backup the file

sudo cp /usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py /usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py.backup 

Then remove it

sudo rm -rf /usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py

do this to other offending files and try again

share|improve this answer
    
Have done the remove and reinstall as suggested but software sources still not opening up –  rkwbcca Mar 24 '12 at 4:25
    
after you removed the PPA did you run an update? as in sudo apt-get update –  Ringtail Mar 24 '12 at 5:31
    
Yes, I did. Also tried to open software sources from software centre but no success. –  rkwbcca Mar 24 '12 at 15:00
    
After removing the offending files, do I need to reinstall software-properties-gtk –  rkwbcca Mar 24 '12 at 20:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.