[Grok-dev] grok 0.13 installation problem on hardy heron

Sebastian Ware sebastian at urbantalk.se
Tue Jul 1 03:14:17 EDT 2008


I might have spent countless hours with this one... :p

Your OS might be adding hidden files. Read this:

11 jun 2008 kl. 17.59 skrev Martijn Faassen:

> Hm, okay, so the double-dot theory is the correct one. Somehow in  
> grok_module, module_info.dottedname contains two dots instead of one.
>
> Is it conceivable that your editor creates dotted names for  
> temporary file names? (perhaps backup files?). I.e. that there are  
> times when a "._app.py" file exists in your directory (besides  
> "_app.py"?)?

that's an affirmative! (though it is not a backup file)

>
>
> If so, I suspect the problem can be fixed in scan.py, in the method  
> 'getSubModuleInfos'.
>
> There's a for loop there:
>
> for entry in sorted(os.listdir(directory)):
>
> if you add as the first line in that loop the following:
>
>  if entry.startswith('.'):
>      continue

didn't test this one since...

>
>
> that might fix matters. Should be safe enough to add this to  
> Martian, as Python modules aren't supposed to start with a dot.
>
> In fact, module names have to start with an alphabetic character or  
> an underscore, so we can expand this rule to the following:
>
>  if not entry[0].isalpha() and entry[0] != '_':
>      continue

...this works like a charm!


Mvh Sebastian

1 jul 2008 kl. 03.37 skrev Jonah Crawford:

> Hi all,
>
> I've followed the virtualenv/grokproject installation process. The  
> vanilla app starts up once but never to start again -- spitting out  
> the errors posted below when I run it in fg. No changes are made to  
> any files -- the app simply runs once and then won't restart...  
> eyeing my amd64 box very suspiciously at this point.
>
> Jonah Crawford
>
>
>
>
>
> /home/myhome/MyApp/parts/app/runzope -C /home/myhome/MyApp/parts/ 
> zopectl/zope.conf
> Traceback (most recent call last):
>   File "/home/myhome/MyApp/parts/app/runzope", line 118, in ?
>     zope.app.twisted.main.main()
>   File "/home/myhome/buildout-eggs/tmpOgYAn4/zope.app.twisted-3.4.0- 
> py2.4.egg/zope/app/twisted/main.py", line 74, in main
>   File "/home/myhome/buildout-eggs/tmpOgYAn4/zope.app.twisted-3.4.0- 
> py2.4.egg/zope/app/twisted/main.py", line 145, in setup
>   File "/home/myhome/buildout-eggs/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 "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 610, in file
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 546, in include
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 378, in processxmlfile
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>     xmlreader.IncrementalParser.parse(self, source)
>   File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>     self.feed(buffer)
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>     self._parser.Parse(data, isFinal)
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in  
> end_element_ns
>     self._cont_handler.endElementNS(pair, None)
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 357, in endElementNS
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py",  
> line 542, in end
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py",  
> line 690, in finish
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 546, in include
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 378, in processxmlfile
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 107, in parse
>     xmlreader.IncrementalParser.parse(self, source)
>   File "/usr/lib/python2.4/xml/sax/xmlreader.py", line 123, in parse
>     self.feed(buffer)
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 207, in feed
>     self._parser.Parse(data, isFinal)
>   File "/usr/lib/python2.4/xml/sax/expatreader.py", line 348, in  
> end_element_ns
>     self._cont_handler.endElementNS(pair, None)
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",  
> line 357, in endElementNS
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py",  
> line 542, in end
>   File "/home/myhome/buildout-eggs/tmpx4Xsy-/ 
> zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py",  
> line 690, in finish
>   File "/home/myhome/buildout-eggs/tmpJAfhUh/grokcore.component-1.4- 
> py2.4.egg/grokcore/component/zcml.py", line 48, in grokDirective
>   File "/home/myhome/buildout-eggs/tmpJAfhUh/grokcore.component-1.4- 
> py2.4.egg/grokcore/component/zcml.py", line 53, in do_grok
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/core.py", line 202, in grok_dotted_name
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/core.py", line 207, in grok_package
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/core.py", line 205, in grok_package
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/core.py", line 210, in grok_module
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/scan.py", line 118, in getModule
>   File "/home/myhome/buildout-eggs/tmpukDvAa/martian-0.10-py2.4.egg/ 
> martian/scan.py", line 191, in resolve
> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/home/ 
> myhome/MyApp/parts/app/site.zcml", line 4.0-4.25
>     ZopeXMLConfigurationError: File "/home/myhome/MyApp/src/MyApp/ 
> configure.zcml", line 5.2-5.27
>     ValueError: Empty module name
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list