[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
warning:
c:\docume~1\jm\.buildout\eggs\zope.configuration-3.4.0-py2.4.egg\zope\configuration\config.py:197:
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:
File
"c:\docume~1\jm\.buildout\eggs\zope.tales-3.4.0-py2.4.egg\zope\tales\tales.py",
line 696, in evaluate
return expression(self)
-
c:\docume~1\jm\.buildout\eggs\grokcore.formlib-1.1-py2.4.egg\grokcore\formlib\templates\default_edit_form.pt
- 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
URL=http://localhost:8081/test/add>,
'static': <grokcore.view.components.DirectoryResource object at
0x02253A50>,
'template': <grokcore.view.components.TrustedFilePageTemplate object
at 0x01725F10>,
'view': <test.app.Add object at 0x02318330>}
File
"c:\docume~1\jm\.buildout\eggs\zope.tales-3.4.0-py2.4.egg\zope\tales\expressions.py",
line 217, in __call__
return self._eval(econtext)
File
"c:\docume~1\jm\.buildout\eggs\zope.tales-3.4.0-py2.4.egg\zope\tales\expressions.py",
line 211, in _eval
return ob()
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\itemswidgets.py",
line 341, in __call__
contents.append(self._div('value', self.renderValue(value)))
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\itemswidgets.py",
line 434, in renderValue
rendered_items = self.renderItems(value)
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\itemswidgets.py",
line 444, in renderItems
return self.renderItemsWithValues([value])
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\itemswidgets.py",
line 392, in renderItemsWithValues
for term in self.vocabulary:
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\source.py",
line 537, in <lambda>
lambda value: self.getTerm(value), self.source.__iter__())
File
"c:\docume~1\jm\.buildout\eggs\zope.app.form-3.7.0-py2.4.egg\zope\app\form\browser\source.py",
line 529, in getTerm
return self.terms.getTerm(value)
File
"c:\docume~1\jm\.buildout\eggs\zc.sourcefactory-0.4.0-py2.4.egg\zc\sourcefactory\browser\source.py",
line 46, in getTerm
token = self.source.factory.getToken(value)
File
"c:\docume~1\jm\.buildout\eggs\zc.sourcefactory-0.4.0-py2.4.egg\zc\sourcefactory\policies.py",
line 100, in getToken
return zc.sourcefactory.interfaces.IToken(value)
File
"c:\docume~1\jm\.buildout\eggs\zope.app.component-3.4.1-py2.4.egg\zope\app\component\hooks.py",
line 95, in adapter_hook
return siteinfo.adapter_hook(interface, object, name, default)
File
"c:\docume~1\jm\.buildout\eggs\zc.sourcefactory-0.4.0-py2.4.egg\zc\sourcefactory\browser\token.py",
line 38, in fromString
return md5.md5(value).hexdigest()
TypeError: new() argument 1 must be string or read-only buffer, not
ContainedProxy
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:
File
"C:\Docume~1\jm\.buildout\eggs\zope.app.container-3.5.6-py2.4-win32.egg\zope\app\container\browser\metaconfigure.py",
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
"c:\docume~1\jm\.buildout\eggs\grok-1.0a1-py2.4.egg\grok\configure.zcml",
line 9.2-9.59
ZopeXMLConfigurationError: File
"c:\docume~1\jm\.buildout\eggs\zope.app.zcmlfiles-3.4.3-py2.4.egg\zope\app\zcmlfiles\meta.zcml",
line 16.0-16.65
ZopeXMLConfigurationError: File
"c:\docume~1\jm\.buildout\eggs\zope.app.container-3.5.6-py2.4-win32.egg\zope\app\container\browser\meta.zcml",
line 8.2
-12.10
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