Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CKAN Development Install Issue: AttributeError: 'module' object has no attribute 'css/main.debug.css'

Tags:

ckan

I've done a CKAN development install and am running with debug = true in my development.ini file. On visiting localhost:5000 I get an error with a traceback whose end point is the error:

AttributeError: 'module' object has no attribute 'css/main.debug.css'

Caused by the call in lib/helpers.py:

r = getattr(fanstatic_resources, resource)

Any idea what I'm doing wrong and what I can do to fix this error.

like image 951
Rufus Pollock Avatar asked Nov 20 '12 19:11

Rufus Pollock


1 Answers

You need to run the less script from the bin directory in the CKAN source code to build the main.debug.css file. There is some documentation of this but it's not yet integrated with the rest of the CKAN docs (i.e. there's no link to it anywhere, we have a ticket to fix this).

This works on Ubuntu 12.04, you might need to have your virtualenv active when you do this:

sudo apt-get install nodejs npm
npm install less nodewatch
./bin/less # Assuming you're in your ckan dir e.g. `~/pyenv/src/ckan`

Now restart the paster serve development.ini command and it should work.

Generally speaking whenever running CKAN 2.0 for development you should:

  • Have debug = True in your ini file
  • Have ./bin/less running in a terminal all the time
like image 191
Sean Hammond Avatar answered Oct 10 '22 20:10

Sean Hammond