[Grok-dev] Re: Grokinstallation corrupts when editing source
remotely over AFP
Sebastian Ware
sebastian at urbantalk.se
Wed Jun 11 11:23:06 EDT 2008
I edited app.py, adding some simple arithmetic to an update method
(the first three lines):
def update(self):
a= 1
b = 2
c = a + b
protoncms.protonbase.ProtonEdit.update(self)
Macintosh:/Volumes/PsycadeliaRAID/groklive/Tester grandvinumserver$
bin/zopectl fg
/Volumes/PsycadeliaRAID/groklive/Tester/parts/app/runzope -C /Volumes/
PsycadeliaRAID/groklive/Tester/parts/zopectl/zope.conf
***** Original name: 'tester.._app'
Traceback (most recent call last):
File "/Volumes/PsycadeliaRAID/groklive/Tester/parts/app/runzope",
line 117, in ?
zope.app.twisted.main.main()
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmp9QsID1/
zope.app.twisted-3.4.0a1-py2.4.egg/zope/app/twisted/main.py", line 74,
in main
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmp9QsID1/
zope.app.twisted-3.4.0a1-py2.4.egg/zope/app/twisted/main.py", line
145, in setup
File "/Volumes/PsycadeliaRAID/groklive/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 "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 610, in file
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 546, in include
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 378, in processxmlfile
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107,
in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in
parse
self.feed(buffer)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 207,
in feed
self._parser.Parse(data, isFinal)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 348,
in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 357, in endElementNS
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py", line
542, in end
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py", line
690, in finish
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 546, in include
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 378, in processxmlfile
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 107,
in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/local/lib/python2.4/xml/sax/xmlreader.py", line 123, in
parse
self.feed(buffer)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 207,
in feed
self._parser.Parse(data, isFinal)
File "/usr/local/lib/python2.4/xml/sax/expatreader.py", line 348,
in end_element_ns
self._cont_handler.endElementNS(pair, None)
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/xmlconfig.py",
line 357, in endElementNS
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py", line
542, in end
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpQo8stg/
zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.py", line
690, in finish
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpHtG3Zp/grok-0.12.1-
py2.4.egg/grok/zcml.py", line 48, in grokDirective
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpHtG3Zp/grok-0.12.1-
py2.4.egg/grok/zcml.py", line 53, in do_grok
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpq-k-CA/martian-0.9.3-
py2.4.egg/martian/core.py", line 193, in grok_dotted_name
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpq-k-CA/martian-0.9.3-
py2.4.egg/martian/core.py", line 198, in grok_package
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpq-k-CA/martian-0.9.3-
py2.4.egg/martian/core.py", line 196, in grok_package
File "/Volumes/PsycadeliaRAID/groklive/eggs/tmpq-k-CA/martian-0.9.3-
py2.4.egg/martian/core.py", line 201, in grok_module
File "/Volumes/PsycadeliaRAID/groklive/eggs/martian-0.9.3-py2.4.egg/
martian/scan.py", line 118, in getModule
self._module = resolve(self.dotted_name)
File "/Volumes/PsycadeliaRAID/groklive/eggs/martian-0.9.3-py2.4.egg/
martian/scan.py", line 190, in resolve
__import__(used)
zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/Volumes/
PsycadeliaRAID/groklive/Tester/parts/app/site.zcml", line 4.0-4.28
ZopeXMLConfigurationError: File "/Volumes/PsycadeliaRAID/groklive/
Tester/src/tester/configure.zcml", line 5.2-5.27
ValueError: Empty module name
Mvh Sebastian
11 jun 2008 kl. 14.53 skrev Martijn Faassen:
> Hey,
>
> Sebastian Ware wrote:
>> I have this recurring problem that is quite a pain.
>> If I edit a source file on my production server remotely over an
>> AFP-connection the project is corrupted (I use Textmate).
>
> Editing code on a production server, bad Sebastian. Sounds like
> you're someone who would benefit from 'grokdeploy', once it exists. :)
>
>> The only solution is to reinstall a new grokproject and copy the
>> source files etc, but it is a royal... Traceback:
>
> [snip]
>> "/Volumes/PsycadeliaRAID/groklive/eggs/tmpq-k-CA/martian-0.9.3-
>> py2.4.egg/martian/scan.py", line 188, in resolve
>> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File "/
>> Volumes/PsycadeliaRAID/groklive/Nackademin/parts/app/site.zcml",
>> line 4.0-4.32
>> ZopeXMLConfigurationError: File "/Volumes/PsycadeliaRAID/
>> groklive/Nackademin/src/nackademin/configure.zcml", line 5.2-5.27
>> ValueError: Empty module name
>
> For some reason Martian's dotted (module) name resolution system
> chokes. It looks like one of the names in the dotted name is somehow
> empty - this can happen if a name like 'foo..bar' is encountered, or
> just '.' is split. Then you get the equivalent of this behavior:
>
> >>> __import__('')
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> ValueError: Empty module name
>
> It'd be interesting if you could put the following code in scan.py
> in your martian egg. First, in the first line in def resolve:
>
> orig_name = name
>
> and then around the existing __import__(used):
>
> try:
> __import__(used)
> except ValueError:
> print "***** Original name:", repr(orig_name)
> raise
>
> This should print the original name that entered resolve each time
> you get your error. Hopefully we then get more of a clue about
> what's going on. You should be able to find the output just before
> the exception traceback.
>
> Regards,
>
> Martijn
>
> _______________________________________________
> 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