I have been plagued by a very strange bug tonight. I am trying to create a base class for a zClass, and I had an typo on a line of the code, which caused an import to fail. No matter how hard I tried, I could not get get Zope to notice that the line had changed, despite many restarts, removals of .pyc files, etc. The exception would still get thrown, and the line of source quoted, always had source that no longer exited in the .py file. Finally, I thought that perhaps I should delete the product altogether, and then restart zope. Now the product does not show up at all. Ever. No matter what I do (including undo of the delete). Finally, I moved the source code out of zope's home directory, and blew zope away, and reinstalled from scratch from source. When I move my code back into lib/python/Products, it still fails to appear in teh product list, even as a broken product. I have looked at the source, and it does not look as though it has been modified, and this is an entirely new Data.fs file, so what could possibly be going on. Any ideas, anyone? This is not my first product (zClass or otherwise) and I have never seen this problem bfore. Zope is version 2.1.6 Please help. --sam
Oops. It would appear that a typo in my registerBaseClass call caused the product to not appear, once all of the syntax errors were removed. Please ignore this message. Sam Gendler wrote:
I have been plagued by a very strange bug tonight. I am trying to create a base class for a zClass, and I had an typo on a line of the code, which caused an import to fail. No matter how hard I tried, I could not get get Zope to notice that the line had changed, despite many restarts, removals of .pyc files, etc. The exception would still get thrown, and the line of source quoted, always had source that no longer exited in the .py file.
Finally, I thought that perhaps I should delete the product altogether, and then restart zope. Now the product does not show up at all. Ever. No matter what I do (including undo of the delete).
Finally, I moved the source code out of zope's home directory, and blew zope away, and reinstalled from scratch from source. When I move my code back into lib/python/Products, it still fails to appear in teh product list, even as a broken product. I have looked at the source, and it does not look as though it has been modified, and this is an entirely new Data.fs file, so what could possibly be going on.
Any ideas, anyone?
This is not my first product (zClass or otherwise) and I have never seen this problem bfore. Zope is version 2.1.6
Please help.
--sam
Sam Gendler wrote:
Oops. It would appear that a typo in my registerBaseClass call caused the product to not appear, once all of the syntax errors were removed. Please ignore this message.
Man am I good or what ;). This should still be fixed though, is it in the collector? I'd add it just in case. -Michel
Sam Gendler wrote:
I have been plagued by a very strange bug tonight. I am trying to create a base class for a zClass, and I had an typo on a line of the code, which caused an import to fail. No matter how hard I tried, I could not get get Zope to notice that the line had changed, despite many restarts, removals of .pyc files, etc. The exception would still get thrown, and the line of source quoted, always had source that no longer exited in the .py file.
Finally, I thought that perhaps I should delete the product altogether, and then restart zope. Now the product does not show up at all. Ever. No matter what I do (including undo of the delete).
There is a exception being raised in your __init__.py file for your Product almost certainly in your initialize(context) method. This exception gets buried and you never see it. Old errors get retained in the ODB as an artifact of this bug. The only way to trap this is to put a debuging assertion in the initialize and step through it till you see your error: def initialize(context): import pdb pdb.set_trace() ... This is a known bug. I believe it is in the collector but I'm not sure. Tres? Any word on this one? -Michel
participants (2)
-
Michel Pelletier -
Sam Gendler