[Grok-dev] newbie's first problematic experience with grok 11.1

Alia alia_khouri at yahoo.com
Fri Feb 8 09:42:54 EST 2008


Hi Folks,

I've just started to try to experiment with Grok, but I think there seems to be an issue with the latest version of grok 11.1 dependency on some of the other modules. Here's my sequence of commands :

<start>

C:\TMP\grok>\engines\Python24\Scripts\grokproject.exe foo
Enter module (Name of a demo Python module placed into the package) ['app.py']:

Enter user (Name of an initial administrator user): sa
Enter passwd (Password for the initial administrator user): password
Enter eggs_dir (Location where zc.buildout will look for and place packages) ['c:\\zen\\config/buildout-eggs']:
Creating directory .\foo
Invoking zc.buildout...

C:\TMP\grok>cd \zen\config

C:\Zen\config>cd buildout-eggs

C:\Zen\config\buildout-eggs>ls
grok-0.11.1-py2.4.egg                  zc.zodbrecipes-0.3.1-py2.4.egg
lovely.recipe-0.3.1b1-py2.4.egg        zdaemon-2.0.0-py2.4.egg
zc.buildout-1.0.0-py2.4.egg            zope.app.locales-3.4.0a1-py2.4.egg
zc.recipe.filestorage-1.0.0-py2.4.egg

C:\Zen\config\buildout-eggs>cd ..

C:\Zen\config>cd \TMP\grok\foo

C:\TMP\grok\foo>ls
bin  buildout.cfg  develop-eggs  parts  setup.py  src

C:\TMP\grok\foo>bin\zopectl.exe fg
c:\zen\config\buildout-eggs\grok-0.11.1-py2.4.egg\grok\components.py:29: Depreca
tionWarning: Role is deprecated. It has moved to zope.securitypolicy.role  This
reference will be removed somedays
  from zope.app.securitypolicy.role import Role
c:\zen\config\buildout-eggs\grok-0.11.1-py2.4.egg\grok\meta.py:26: DeprecationWa
rning: IRole is deprecated. It has moved to zope.securitypolicy.interfaces  This
 reference will be removed somedays
  from zope.app.securitypolicy.interfaces import IRole
c:\zen\config\buildout-eggs\grok-0.11.1-py2.4.egg\grok\meta.py:27: DeprecationWa
rning: rolePermissionManager is deprecated. It has moved to zope.securitypolicy.
rolepermission  This reference will be removed somedays
  from zope.app.securitypolicy.rolepermission import rolePermissionManager
C:\engines\Python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg\zope\co
nfiguration\config.py:197: DeprecationWarning: ZopeSecurityPolicy is deprecated.
 It has moved to zope.securitypolicy.zopepolicy  This reference will be removed
somedays
  obj = getattr(mod, oname)
Traceback (most recent call last):
  File "C:\TMP\grok\foo\parts\app\runzope-script.py", line 13, in ?
    zope.app.twisted.main.main()
  File "c:\engines\python24\lib\site-packages\zope.app.twisted-3.4.1-py2.4.egg\z
ope\app\twisted\main.py", line 74, in main
    service = setup(load_options(args))
  File "c:\engines\python24\lib\site-packages\zope.app.twisted-3.4.1-py2.4.egg\z
ope\app\twisted\main.py", line 145, in setup
    zope.app.appsetup.config(options.site_definition, features=features)
  File "c:\engines\python24\lib\site-packages\zope.app.appsetup-3.4.1-py2.4.egg\
zope\app\appsetup\appsetup.py", line 111, in config
    context = xmlconfig.file(file, context=context, execute=execute)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 610, in file
    include(context, name, package)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Engines\Python24\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 348, in end_elemen
t_ns
    self._cont_handler.endElementNS(pair, None)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 542, in end
    self.stack.pop().finish()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 690, in finish
    actions = self.handler(context, **args)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Engines\Python24\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 348, in end_elemen
t_ns
    self._cont_handler.endElementNS(pair, None)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 542, in end
    self.stack.pop().finish()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 690, in finish
    actions = self.handler(context, **args)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 546, in include
    processxmlfile(f, context)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 378, in processxmlfile
    parser.parse(src)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 107, in parse
    xmlreader.IncrementalParser.parse(self, source)
  File "C:\Engines\Python24\lib\xml\sax\xmlreader.py", line 123, in parse
    self.feed(buffer)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 207, in feed
    self._parser.Parse(data, isFinal)
  File "C:\Engines\Python24\lib\xml\sax\expatreader.py", line 348, in end_elemen
t_ns
    self._cont_handler.endElementNS(pair, None)
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\xmlconfig.py", line 357, in endElementNS
    self.context.end()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 542, in end
    self.stack.pop().finish()
  File "c:\engines\python24\lib\site-packages\zope.configuration-3.4.0-py2.4.egg
\zope\configuration\config.py", line 690, in finish
    actions = self.handler(context, **args)
  File "c:\zen\config\buildout-eggs\tmpvecujn\grok-0.11.1-py2.4.egg\grok\zcml.py
", line 48, in grokDirective
  File "c:\zen\config\buildout-eggs\tmpvecujn\grok-0.11.1-py2.4.egg\grok\zcml.py
", line 53, in do_grok
  File "c:\engines\python24\lib\site-packages\martian-0.9.3-py2.4.egg\martian\co
re.py", line 193, in grok_dotted_name
    grok_package(module_info, grokker, **kw)
  File "c:\engines\python24\lib\site-packages\martian-0.9.3-py2.4.egg\martian\co
re.py", line 196, in grok_package
    grok_module(module_info, grokker, **kw)
  File "c:\engines\python24\lib\site-packages\martian-0.9.3-py2.4.egg\martian\co
re.py", line 202, in grok_module
    module_info=module_info, **kw)
  File "c:\engines\python24\lib\site-packages\martian-0.9.3-py2.4.egg\martian\co
re.py", line 65, in grok
    grokked = g.grok(name, obj, **kw)
  File "c:\zen\config\buildout-eggs\tmpvecujn\grok-0.11.1-py2.4.egg\grok\meta.py
", line 61, in grok
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "C:\TMP\grok\foo\pa
rts\app\site.zcml", line 4.0-4.25
    ZopeXMLConfigurationError: File "c:\tmp\grok\foo\src\foo\configure.zcml", li
ne 3.2-3.28
    ZopeXMLConfigurationError: File "c:\zen\config\buildout-eggs\grok-0.11.1-py2
.4.egg\grok\configure.zcml", line 82.2-82.31
    AttributeError: 'module' object has no attribute 'determine_module_context'
Zope3 started in forground:  C:\TMP\grok\foo\parts\app\runzope -C C:\TMP\grok\fo
o\parts\zopectl\zope.conf

</end>

Obviously, in grok 11.1 grok.util has no function 'determine_module_context', I checked out the svn version last night (grok-0.12dev-py2.4.egg) and lo and behold grok.util _does_  have  the missing function. However, buildout is hardwired to the incorrect version and I'm kinda confused at this stage.... Either I find a way to reference grok 0.12 dev or the grok developers should probably make grok 11.1 reference the libraries which do not depend on the missing function given a easy_install -U grok command and/or grokproject <projname> command.

Incidentally, I think I do have the correct zope eggs as I can run a full version of z3 instance from the libs.

Cheers.

AK
























      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20080208/e05fa9f9/attachment-0001.htm


More information about the Grok-dev mailing list