[Grok-dev] Re: Grokinstallation corrupts when editing source remotely over AFP

Martijn Faassen faassen at startifact.com
Wed Jun 11 08:53:28 EDT 2008


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



More information about the Grok-dev mailing list