[Grok-dev] Entity Relations and Forms

Jeroen Michiel jmichiel at yahoo.com
Wed Jan 21 05:47:46 EST 2009

Martijn Faassen-2 wrote:
> Jeroen Michiel wrote:
> Which version of zc.sourcefactory do you have installed? If it's 0.4.0
> there have been some changes in the dependency structure - it should now
> pull in zope.browser for ITerms. That can't explain the non-registration
> of this package though, as zope.browser doesn't feature any component 
> registration code at all, just the interface definition. Perhaps you 
> need a newer version of zope.app.form than the one Grok requires? Try 
> setting 3.7.0 of that package in versions.cfg (or in a [versions] 
> section in your buildout.cfg) and see whether that fixes it. From the 
> changelog of that package, it also looks like it needs a newer version 
> of zope.schema than the one we perhaps use.
> Anyway, please file an issue if that's so (or if you can't get it 
> working anyhow), we definitely need to have this work out of the box.

It's indeed version 0.4.0 I got.
I pinned it to 0.3.5 in versions.cfg and it works now. Perhaps this should
be done in the official versions.cfg, or can't you do that because it's not
needed for everyone? I'm not up to speed with buildout and pinned versions
and stuff like that (yet).

I tried on a testproject to use the 0.4.0 of sourcefactory, but went from
one error to another...
I changed zope.app.form to version 3.7.0 as you suggested, and that indeed
requires zop.schema>=3.5a1
So I also changed that, but while starting up the server, I got this
DeprecationWarning: ITerms is deprecated. It has moved t
o zope.browser.interfaces This reference will be gone sometimes.
Trying the add page dumped this error:
line 696, in evaluate
    return expression(self)
   - Line 47, Column 12
   - Expression: <PathExpr standard:u'widget'>
   - Names:
      {'args': (),
       'context': <test.app.Test object at 0x01CB3A30>,
       'default': ,
       'loop': {},
       'nothing': None,
       'options': {},
       'repeat': {},
       'request': <zope.publisher.browser.BrowserRequest instance
       'static': <grokcore.view.components.DirectoryResource object at
       'template': <grokcore.view.components.TrustedFilePageTemplate object
at 0x01725F10>,
       'view': <test.app.Add object at 0x02318330>}
line 217, in __call__
    return self._eval(econtext)
line 211, in _eval
    return ob()
line 341, in __call__
    contents.append(self._div('value', self.renderValue(value)))
line 434, in renderValue
    rendered_items = self.renderItems(value)
line 444, in renderItems
    return self.renderItemsWithValues([value])
line 392, in renderItemsWithValues
    for term in self.vocabulary:
line 537, in <lambda>
    lambda value: self.getTerm(value), self.source.__iter__())
line 529, in getTerm
    return self.terms.getTerm(value)
line 46, in getTerm
    token = self.source.factory.getToken(value)
line 100, in getToken
    return zc.sourcefactory.interfaces.IToken(value)
line 95, in adapter_hook
    return siteinfo.adapter_hook(interface, object, name, default)
line 38, in fromString
    return md5.md5(value).hexdigest()
TypeError: new() argument 1 must be string or read-only buffer, not

So I figured perhaps the warning is a good hint, and I changed the
zope.configuration to the latest version , being 3.4.1, but that did not
remove the warning, or solve the error.

As the penultimate egg that was used in the error log was zop.app.component,
I tried getting a later version for that one (3.5.0), although it didn't
state anything in the changes log about this.
But while starting up the server, I got this error:
line 29, in ?
    from zope.app.component.back35 import LayerField
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
"D:\grok\test\etc\site.zcml", line 4.2-4.28
    ZopeXMLConfigurationError: File "d:\grok\test\src\test\configure.zcml",
line 3.2-3.28
    ZopeXMLConfigurationError: File
line 9.2-9.59
    ZopeXMLConfigurationError: File
line 16.0-16.65
    ZopeXMLConfigurationError: File
line 8.2
    ImportError: No module named back35

And then I gave up...

I made a bugreport for it: https://bugs.launchpad.net/bugs/319546

View this message in context: http://www.nabble.com/Entity-Relations-and-Forms-tp19014121p21580759.html
Sent from the Grok mailing list archive at Nabble.com.

More information about the Grok-dev mailing list