[ckan-dev] UndefinedError: {[CUT...]} has no member named "id"

Ivan Ricotti i.ricotti at hyperborea.com
Wed Feb 13 17:41:06 UTC 2013


Hello everybody,

I've implemented a plugin for a new form for my Dataset (CKAN 1.8):

class PatDatasetForm(SingletonPlugin, DefaultDatasetForm):

    implements(IDatasetForm, inherit=True)
    implements(IConfigurer, inherit=True)

    def is_fallback(self):
        return True

    def package_types(self):
        return ['dataset']

    ...

The create form works fine but now, any time I try to access to the
package view or to edit a previously created dataset, I get this error:

File '/home/ivan/pyenv/src/ckan/ckan/templates/package/layout.html',
line 40 in <Expression u"h.subnav_link(\n
h.icon('authorization_group') + _('Followers
({num_followers})').format(num_followers=h.follow_count('dataset',
c.pkg_dict.id)),\n            controller='package',\n
action='followers',\n            id=c.pkg.name)">
  ${h.subnav_link(
File '/home/ivan/pyenv/src/ckan/ckan/config/environment.py', line 269 in
genshi_lookup_attr
  val = cls.undefined(key, owner=obj)
File
'/home/ivan/pyenv/local/lib/python2.7/site-packages/genshi/template/eval.py',
line 410 in undefined
  raise UndefinedError(key, owner=owner)

UndefinedError: {[CUT...]} has no member named "id"

Any ideas?

Thanks,
Ivan

-- 
Ing. Ivan Ricotti
---------------------------------------------
Hyperborea s.r.l.
c/o Polo Scientifico e Tecnologico
Via Giuntini 25, 56023 Navacchio (PI) - Italy
phone:	+39.050.754241
fax:	+39.050.754240
e-mail: i.ricotti at hyperborea.com
web:	http://www.hyperborea.com





More information about the ckan-dev mailing list