You are here
Home > Linux > Application Configuration > Subterfuge – No module named defaults

Subterfuge – No module named defaults


Subterfuge – No module named defaults – resolved

Why does this happen?

After scratching my head for a couple of minutes over this I realized that this was a compilation or rather package error by the subterfuge. And happens because the configuration file that Ubuntu is referring to inside the file no longer exists. Well technically speaking it does still exist but just with a different file name. This means that the reference information inside the original django.conf.urls.defaults file is still relevant and the same as the previous file but the pointer inside the file is broken as it is referring to a file that simply does not exist.

I hope that this gets resolved in newer versions but for the time being I have got the solution for you below.

The he complete error that you receive is:

ImportError at /
No module named defaults
Request Method: GET
Request URL:
Django Version: 1.6.1
Exception Type: ImportError
Exception Value:
No module named defaults
Exception Location: /usr/share/subterfugea/ in , line 1
Pythone Executable: /usr/bin/python
Python Version: 2.7.6
Python Path:
Server time: Mon, 4 Apr 2016 02:14:44 -0500

Let’s look at the SOLUTION

1. Edit the following file using your favorite editor, in my case I will be using gedit
sudo gedit /usr/share/subterfuge/

2. Inside the file on line 1 you should have the following

from django.conf.urls.defaults import patterns, include, url

3. Remove the word “defaults” so it looks like this

from django.conf.urls import patterns, include, url

4. Save the file and start the application by running the following command

sudo subterfuge


You might get the following “error that port is already in use”, simply run the following to kill all the processes associated with port 80

sudo fuser -k 80/tcp

If this was helpful please consider a donation

Thank you for following my tutorial. You can click here for more Ubuntu Tutorials.

[sg_popup id=1]