: Cant locate template for uri ‘type/default’

Got this error when viewing items in the browser using the “python-fedoracommons-webarchive” application

<class ‘mako.exceptions.TemplateLookupException’>: Cant locate template for uri ‘type/default’

I made a copy of the /opt/python-fedoracommons-webarchive/archive/templates/type/general.mak file and saved it to the /opt/python-fedoracommons-webarchive/archive/templates/type directory (called it default) without an extension. Tried to view the item in the browser again and problem was gone


One thought on “: Cant locate template for uri ‘type/default’

  1. Hi,

    I had a similar problem but I solved it in a different way.
    I too followed http://oxfordrepo.blogspot.com/2008/02/creating-web-application-from-scratch.html.

    Firstly, there seems to be a missing python file ./archive/lib/legacy.py (the .pyc is), which wouldn’t really have been an issue except I got “ImportError: Bad magic number in archive/lib/legacy.pyc” under linux (python 2.4).

    Secondly, I am only trying to index objects I have placed into my fedora repository, and these objects have a MODS datastreams.

    1. When adding “uuid” to the retainPID in the fedora.fcfg file I also added “type”.
    2. I created a content model with the PID “type:article”, other types can be found in ./archive/lib/app_globals.py
    3. On my article digital object, I went to the RELS-EXT datastream and set a new relationship “rel:isMemberOf” and set it to “info:fedora/type:article”
    4. I used the scan_changed_items_since.py script with no paramaters to ingest my objects into solr, however I changed it to use the BasicSolrFeeder opposed to the DCSolrFeeder, which indexes the MODS and RELS-EXT datastreams.
    5. I added the extra solr fields that BasicSolrFeeder emits to the default_solr_schema.xml that I was using with solr, eg. given, content_type, etc.
    6. I added the fields I wanted displayed on the initial page to archive/lib/search_terms.py
    7. Ran the scan_changed_items_since.py script.

    After this (I think I got everything), I no longer had the error message as my objects were of a type that had an existing template.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s