[Grok-dev] re gistering vocabulary

Sebastian Ware sebastian at urbantalk.se
Mon May 9 06:13:25 EDT 2011


The only difference I see is that you name your vocab with a string

  grok.name('Time of Day')

and I use a unicode string

  grok.name(u'visibility')

oh, we have also added

  'zope.app.schema'

to install_requires in setup.py, I have a vague memory that this was related.

Mvh Sebastian

9 maj 2011 kl. 11.03 skrev Jeroen Michiel:

> 
> I have the exact same issue while trying to upgrade a v1.1 project to v1.4
> 
> I create my vocabularies like this:
> 
> class TimeOfDayVocabulary(grok.GlobalUtility):
>    grok.implements(IVocabularyFactory)
>    grok.name('Time of Day')
>    def __call__(self, context):
>        return SimpleVocabulary.fromValues([u'Day', u'Night', u'Dusk',
> u'Dawn'])
> 
> but each time a schema field tries to access them, I get a
> VocabularyRegistryError: unknown vocabulary: u'Time of Day'
> 
> I'll try to revert to v1.3 and see if that makes any difference...
> -- 
> View this message in context: http://old.nabble.com/registering-vocabulary-tp31388474p31575120.html
> Sent from the Grok mailing list archive at Nabble.com.
> 
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
> 



More information about the Grok-dev mailing list