Open anibalpacheco opened 10 years ago
The file is there, so I'm not sure what can be failing. Do other templates work (eg /harvest/new).
You don't need to set ckan.legacy_templates
unless you are using a very old version of CKAN (< 2.0)
Perhaps restarting the server to refresh the templates cache?
harvest/new raises a similar error:
TemplateNotFound: Template source/new_source_form.html cannot be found
Note: If I set extra_template_paths = %(here)s/../ckanext-harvest/ckanext/harvest/templates_new
then the error arising in /harvest is AttributeError: 'module' object has no attribute 'ckanext-harvest/styles/harvest.css'
Had also the same issues with /harvest
and /harvest/new
when requesting against a 2.3.1
instance.
The stack trace for both requests are available via this pastebin.
A pip freeze
would produce the following on the instance:
Babel==0.9.6
Beaker==1.6.4
FormEncode==1.2.6
Genshi==0.6
Jinja2==2.6
Mako==0.9.0
MarkupSafe==0.18
Pairtree==0.7.1-T
Paste==1.7.5.1
PasteDeploy==1.5.0
PasteScript==1.7.5
Pygments==1.6
Pylons==0.9.7
Routes==1.13
SQLAlchemy==0.9.6
Tempita==0.5.2
WebError==0.10.3
WebHelpers==1.3
WebOb==1.0.8
WebTest==1.4.3
argparse==1.2.1
ckan==2.3.1
ckanapi==3.3
ckanclient==0.10
-e git://github.com/ckan/ckanext-harvest.git@83cca925c939efee8d9ebf6f1fcbf35b208f6631#egg=ckanext_harvest-dev
decorator==3.4.0
distribute==0.6.24
docopt==0.6.2
factory-boy==2.1.0
fanstatic==0.12
httpretty==0.7.1
jsonschema==2.3.0
mock==1.0.0
nose==1.3.0
ofs==0.4.1
passlib==1.6.2
pbr==1.3.0
pika==0.9.8
psycopg2==2.4.5
python-dateutil==1.5
pyutilib.component.core==4.5.3
redis==2.10.1
repoze.lru==0.6
repoze.who==2.0
repoze.who-friendlyform==1.0.8
requests==2.2.1
simplejson==3.3.1
six==1.9.0
solrpy==0.9.5
sqlalchemy-migrate==0.9.1
sqlparse==0.1.11
unicodecsv==0.9.4
urllib3==1.11
vdm==0.13
virtualenv==12.1.1
wheel==0.24.0
wsgiref==0.1.2
zope.interface==4.1.1
It seems like the templates_new
is not available after a pip install
via a local zip which has been build via python setup.py sdist
. When I copy the templates_new
folder (coming from a fresh git clone) in retrospect it works that long until I add a new harvester. After a succesful addition when calling /harvester
again I get the errors provided in this log file.
That makes sense, I was struggling to replicate it. This has an easy fix, just adding the templates_new
folder to the MANIFEST.in file:
https://github.com/ckan/ckanext-harvest/blob/master/MANIFEST.in
Do you want to send a quick PR @raphaelstolt?
That's one approach I already tried, sadly with no success. The local zip mentioned earlier contained the templates_new
folder. Also a temporary comment out of https://github.com/ckan/ckanext-harvest/blob/master/setup.py#L49 led to no success. — Will look further into it on Monday.
After a succesful addition (via a copy from a git clone) when calling /harvester
again I get sometimes the errors provided in this log file.
Wondering if the following path (https://github.com/ckan/ckanext-harvest/blob/master/ckanext/harvest/templates_new/base.html#L5) is correct. Having the same issue like @anibalpacheco mentions in his second comment.
I have the same problem of TemplateNotFound: snippets\search_result_text.html not found
I am using ckan version 2.5.2 and i dont have template_new folder as the files has been changed from template_new folders to template folder in recent version.
I followed your steps and installed ckan-harvest from scratch nothing is helping. Please help
@ttan70 your problem seems not related to ckanext-harvest. Is CKAN working for you?
Using last update in branch master, I get:
Even setting or not ckan.legacy_templates