Refresh makes all imported modules = None
Suddenly when I refresh products it seems that all imported modules in the refreshed product are set to None, because after a refresh, anything I try to do always ends up with an error message like "None has no attribute foobar" or "None is not callable", and this always happend when I try to access something that is imported. Has anybody seen this? Zope 2.5.1/Python 2.1.3 Best Regards Lennart Regebro Torped Strategi och Kommunikation AB
I've seen this under 2.5.0, but I don't recall seeing it under 2.3.x or 2.4.x Adrian... -- Adrian Hungate EMail: adrian@haqa.co.uk Web: http://www.haqa.co.uk "All programs evolve until they can send email. Except Microsoft Exchange." -- alt.sysadmin.recovery ----- Original Message ----- From: "Lennart Regebro" <lennart@torped.se> To: <zope-dev@zope.org> Sent: Saturday, June 01, 2002 4:21 PM Subject: [Zope-dev] Refresh makes all imported modules = None
Suddenly when I refresh products it seems that all imported modules in the refreshed product are set to None, because after a refresh, anything I try to do always ends up with an error message like "None has no attribute foobar" or "None is not callable", and this always happend when I try to access something that is imported.
Has anybody seen this?
Zope 2.5.1/Python 2.1.3
Best Regards
Lennart Regebro Torped Strategi och Kommunikation AB
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Lennart Regebro wrote:
Suddenly when I refresh products it seems that all imported modules in the refreshed product are set to None, because after a refresh, anything I try to do always ends up with an error message like "None has no attribute foobar" or "None is not callable",
I get this problem too (specifically, "None is not callable"). I've had to solve it by brute force -- shutting down Zope and restarting. (Zope 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32) After the restart, the product works fine. I have searched the documentation and zope.org but am having trouble finding the requirements for using Refresh (other than I know that the product directory has to have a refresh.txt file in it). Is it required that the product use the "new" method of product initialization, i.e.: def initialize(context): context.registerClass( etc. Thanks, Bill ---------- "The commandments of the LORD are right, bringing joy to the heart. The commands of the LORD are clear, giving insight to life . . . For this is the love of God, that we keep His commandments. And His commandments are not burdensome." (Psalm 19:8, 1John 5:3) <http://torahteacher.com/>torahteacher.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 5/21/02
William Trenker wrote:
Lennart Regebro wrote:
Suddenly when I refresh products it seems that all imported modules in the refreshed product are set to None, because after a refresh, anything I try to do always ends up with an error message like "None has no attribute foobar" or "None is not callable",
I get this problem too (specifically, "None is not callable"). I've had to solve it by brute force -- shutting down Zope and restarting. (Zope 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32) After the restart, the product works fine.
This happens when you create references to the product outside the product. Most Zope products don't need to. Those that do (like CallProfiler and other monkey patch products) should not be considered refreshable.
I have searched the documentation and zope.org but am having trouble finding the requirements for using Refresh (other than I know that the product directory has to have a refresh.txt file in it).
Is it required that the product use the "new" method of product initialization, i.e.: def initialize(context): context.registerClass(
Are you working with products that use the old style? Are they still around? ;-) Shane
At 09:36 AM 6/3/02 -0400, Shane Hathaway wrote:
Are you working with products that use the old style [of product initialization]? Are they still around? ;-)
I'm developing a Zope Database Adapter (DA) for the SQLite (http://www.hwaci.com/sw/sqlite) embedded database. Although a DA isn't a Product in the usual sense, the front-end is registered like a product and has a Management interface. I've noticed that existing DA's that I'm studying for reference, including DCOracle2, don't use the "new" method of Product initialization / registration. Are DA's considered "monkey patch" products? Is it possible to use the Refresh feature during development of a DA? Thanks, Bill http://pysqlite.sourceforge.net ---------- "The commandments of the LORD are right, bringing joy to the heart. The commands of the LORD are clear, giving insight to life . . . For this is the love of God, that we keep His commandments. And His commandments are not burdensome." (Psalm 19:8, 1John 5:3) <http://torahteacher.com/>torahteacher.com --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.363 / Virus Database: 201 - Release Date: 5/21/02
William Trenker wrote:
At 09:36 AM 6/3/02 -0400, Shane Hathaway wrote:
Are you working with products that use the old style [of product initialization]? Are they still around? ;-)
I'm developing a Zope Database Adapter (DA) for the SQLite (http://www.hwaci.com/sw/sqlite) embedded database. Although a DA isn't a Product in the usual sense, the front-end is registered like a product and has a Management interface.
I've noticed that existing DA's that I'm studying for reference, including DCOracle2, don't use the "new" method of Product initialization / registration. Are DA's considered "monkey patch" products? Is it possible to use the Refresh feature during development of a DA?
Ah, good point. I don't know whether it's possible. You probably shouldn't maintain an open connection to the database durng refresh. Shane
I often read that for "security reasons" one should use Apache or Squid in front of Zope. So simple question: why? Isn`t the Medusa Webserver secure that all? And why does zope.org uses Apache? I would like to understand the reasons behind this decision. I thought it was for loadbalancing only - but now there is ZEO - so why using Apache or Squid? Buelent
On Tuesday 04 Jun 2002 12:48 am, buelent aldemir wrote:
I often read that for "security reasons" one should use Apache or Squid in front of Zope.
So simple question: why? Isn`t the Medusa Webserver secure that all?
Against denial of service from malformed or extreme http conversations, no. There are details in the Collector, and list archive.
And why does zope.org uses Apache? I would like to understand the reasons behind this decision. I thought it was for loadbalancing only - but now there is ZEO - so why using Apache or Squid?
I dont understand? ZEO doesnt provide load balancing,
Shane Hathaway <shane@zope.com> wrote:
William Trenker wrote:
Lennart Regebro wrote:
Suddenly when I refresh products it seems that all imported modules in the refreshed product are set to None, because after a refresh, anything I try to do always ends up with an error message like "None has no attribute foobar" or "None is not callable",
I get this problem too (specifically, "None is not callable"). I've had to solve it by brute force -- shutting down Zope and restarting. (Zope 2.5.1 (binary release, python 2.1, win32-x86), python 2.1.3, win32) After the restart, the product works fine.
This happens when you create references to the product outside the product. Most Zope products don't need to. Those that do (like CallProfiler and other monkey patch products) should not be considered refreshable.
It happens to me also. I have a product who uses as a base class something defined in another product. When I refresh the second product, I have to refresh the first one afterwards. Florent -- Florent Guillaume, Nuxeo (Paris, France) +33 1 40 33 79 87 http://nuxeo.com mailto:fg@nuxeo.com
participants (7)
-
Adrian Hungate -
buelent aldemir -
Florent Guillaume -
Lennart Regebro -
Shane Hathaway -
Toby Dickenson -
William Trenker