Re: [Zope] symbols undefined after product refresh?

2005-04-08 Thread Lennart Regebro
On Apr 8, 2005 3:20 PM, Jürgen Herrmann <[EMAIL PROTECTED]> wrote:
> TypeError: 'NoneType' object is not callable

This means that one module that needed to be reloaded either did not
get reloaded or was reloaded before the module from where it is
called.

Exactly why this happens is hard to say, but it happens very often
where you have many modules that are dependent on each other. Refresh
basically is a bit of a pain to use on any module who contains some
sort of "core" functionality that other modules use. In principal you
need to refresh every module that uses the module that was refreshed,
and all modules that uses these modules. In the right order.

Quite often, no matter what you try, it will fail. In that case: restart.

The best way to avoid refresh-problems when debugging is to actually
use unit test, and thus avoid the whole issue...

-- 
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
___
Zope maillist  -  Zope@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 )


Re: [Zope] symbols undefined after product refresh?

2005-04-08 Thread Jens Vagelpohl
On Apr 8, 2005, at 15:20, Jürgen Herrmann wrote:
hi!
after reloading my own products through the zmi it seems like some
classes and methods gets undefined. please see the following
traceback:
Refresh is *not* the panacea to avoid all restarts. If things get 
funky, restart. Simple as that.

jens
___
Zope maillist  -  Zope@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 )


[Zope] symbols undefined after product refresh?

2005-04-08 Thread Jürgen Herrmann
hi!

after reloading my own products through the zmi it seems like some
classes and methods gets undefined. please see the following
traceback:

...
  Module Python expression
"here.zuml_parseAndCheckinModel(newConfigDict)", line 1, in 
  Module Products.IDE.IDEContainer, line 176, in zuml_parseAndCheckinModel
  Module Products.Relateable.MetaManager, line 474, in recreateIndexes
  Module None, line 104, in addSubClassCatalogMethod
TypeError: 'NoneType' object is not callable

the code @ line 104 is:
o = SubClassCatalog(id, searchKeys, subClassNames)

SubClassCatalog is defined in /Products/SubClassCatalog/SubClassCatalog.py,
after I refresh the Product "SubCLassCatalog", i get the error mentioned
above. restarting Zope fixes the Problem, MetaManager::recreatedIndexes()
will work repeatedly until i refresh one or more Products...

did i miss something while importing stuff?
/Products/relateable/MetaManager.py imports the constructor for a
SubClassCatalog like this:
from Products.SubClassCatalog.SubClassCatalog import addSubClassCatalogMethod

i'm pretty puzzled at this point, hope someone got a hint...

regards, juergen herrmann

ps: this does not only happen to my SubClassCatalog, this also hits
f.ex. "from random import randint" where randint gets undefined.

___
Zope maillist  -  Zope@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 )