[Grok-dev] grokproject does not work with other name than app.py

Uli Fouquet uli at gnufix.de
Wed Apr 2 08:06:37 EDT 2008


Hi there,

Joachim Schmitz wrote:

> I did:
> grokproject Academics
> Enter module (Name of a demo Python module placed into the package) 
> ['app.py']: academics.py
[...]
> perry at leise:~/WAeUP_ng/Academics$ ./bin/zopectl fg
> ....
> and finally got:
> 
> Traceback (most recent call last):
[...]
> "/home/perry/buildout-eggs/tmpIZkrcF/grok-0.11.1-py2.4.egg/grok/templatereg.py", 
> line 81, in checkUnassociated
> zope.configuration.config.ConfigurationExecutionError: 
> martian.error.GrokError: Found the following unassociated template(s) 
> when grokking 'academics': index.  Define view classes inher
> iting from grok.View to enable the template(s).
>    in:
>    File "/home/perry/WAeUP_ng/Academics/src/academics/configure.zcml", 
> line 4.2-4.27
>      <grok:grok package="." />
> 
> why asking for an module name, if one cannot use a different name than 
> suggested.

You can, of course. The only exception seem to be module names that are
equal to the package name: you created an 'academics' module inside an
'academics' package. It looks like grok looks in the academics package
for the view definition, doesn't find one (because it is in the same
named module, not the package) and raises this error.

Don't know, whether this is fixed in the current trunk. Otherwise I
would consider this to be a bug.

You can of course use any other name than 'academics.py'.

The bug was reproducable here by creating a grokproject named 'App' and
confirming the defaults.

Kind regards,

-- 
Uli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080402/a871cee8/attachment.bin


More information about the Grok-dev mailing list