Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/", line 96, in __init__
  File "/usr/lib/python2.7/dist-packages/softwareproperties/", line 580, in reload_sourceslist
  File "/usr/lib/python2.7/dist-packages/aptsources/", 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

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/ /usr/lib/python2.7/dist-packages/softwareproperties/ 

Then remove it

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

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


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.