[Zope] external methods and pyc files

Richard Jolly r.jolly at bridgelinkit.com
Wed Feb 4 07:20:17 EST 2004


I'm new to Zope, and I've inherited a project with a bug that I've been 
unable to solve for a couple of days. Please excuse any wrong-terminology.

There is a zope installation, with two containers under the root folder. 
In each of these there is an external method having the same name, 
'search'. On the public side of the site its clear that, on occaision, 
the wrong one of these external methods is called.


The methx's contain sql statements pointing to different databases, and 
the error messages I get are sql errors ( 'no column ...' ), which is 
why its pretty clear which one is being called.

I couldn't find any obvious reason why the wrong one was being called, 
but I found I could disambiguate the external methods by renaming them 
A_methx_search and B_methx_search in the ZMI, and saving the methods to 
reload them. This worked, albeit proving I don't understand the root of 
the problem, however...

The customer installation of this only includes the .pyc files that 
contain the external methods. When I try to rename and reload with the 
.pyc files only in the Extensions folder the problem does not get 
solved. When I remove the .pyc files and put the original .py files in 
place, everything works fine. What is going on?

Finally, when I have .py files only, no .pyc files are generated, which 
I find slightly confusing.



More information about the Zope mailing list