[Zope] Quick question.

Goldthwaite, Joe joe at goldthwaites.com
Fri Nov 21 17:35:14 EST 2003


No offense taken.  I'm not sure what the "stupid_log" is or where you set it
up. It's not indexed in any of the three Zope books I'm using.  I did a
search of zope.org and it mentions a stupid_log in reference to a
FrozenLogger product that doesn't seem to be part of the standard Zope and
the references are from 2000 and 2001.  So if you're trying to be helpful
and don't mean to offend, maybe you could expand on your answer a bit :).

(Like I mentioned, I'm trying to learn this stuff.  I don't really know if
your response is tongue-in-cheek or not.)

-----Original Message-----
From: Wilson, Derek [mailto:dwilson at abrazohealth.com]
Sent: Friday, November 21, 2003 11:53 AM
To: joe at goldthwaites.com; zope at zope.org
Subject: RE: [Zope] Quick question.


Correct me if I'm wrong, but don't you have to setup the "stupid_log"
(no offense)

Thanks,
Derek Wilson


-----Original Message-----
From: Goldthwaite, Joe [mailto:joe at goldthwaites.com]
Sent: Friday, November 21, 2003 11:37 AM
To: zope at zope.org
Subject: [Zope] Quick question.


I'm a newbie learning Python and Zope.  I'm trying to create a Zope
product for my application since programming is more familiar to me than
HTML.  I ran into a problem that caused me to join this list.  In the
process of figuring out how to best ask the question, I found the
answer.

I had created a package using the example in "The Book of Zope".  When I
first restarted the server, I got an error message in the list of
products saying that my package was broken.  It had an error log showing
the line (a
typo) that was causing the problem.  I fixed the line but restarting
Zope kept giving me the same error message on the same line that I had
fixed.  I decided that something funny was going on so I deleted the
package from the "Product Management at /Control_Panel/Products" screen
in the hopes that it would be recreated or I would at least get a new
error message.

The product went away completely and nothing I could do would get it
back. I tried moving it to a different directory, changing the metadata
name, changing the class names, nothing worked.  I could look in the
directory and see that my __init__.pyc file was being created so I knew
Zope was looking at it but it didn't seem to do anything with it.

After working on it for most of the day, I finally found the problem.
At some point, I had accidentally deleted the "s" from the end of the
constructors'  In other words, instead of this;


def initialize(context):
	"""Register the EIS class"""

	context.registerClass(
		EIS.EIS,
		constructors = (
			EIS.manage_addEISForm,
			EIS.manage_addEIS
		),
		permission = 'Add EIS',
		icon='www/icon.gif'
	)

I had This;


def initialize(context):
	"""Register the EIS class"""

	context.registerClass(
		EIS.EIS,
		constructor = (
			EIS.manage_addEISForm,
			EIS.manage_addEIS
		),
		permission = 'Add EIS',
		icon='www/icon.gif'
	)

Notice the missing "s" in "constructor =".  That was doing it.  Now,
here's my question, is there an error log anywhere that would have shown
what was causing the problem without searching for a needle in a
haystack?  I was looking all over the place for some kind of message as
to why the package wasn't showing up but couldn't find anything.  I'm
assuming I just don't know where to look.





_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )




More information about the Zope mailing list