Re: [Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has no attribute 'setHeader' - SOLUTION
Hi all, You'll have seen my message earlier in the month about the above. Well, we figured it out. To cut a long story short, we had a role called 'SYS' in the folder. It was a real forehead slapping moment, with all the team looking around at each other with the unsaid thought of 'oops, that's *probably* not a good idea'. This was the same day that someone else in the team found out that using 'yield' as a variable is also not a good idea. So, we deleted the role, and Bob's your uncle. Lots of smiles all around. cheers for all the help, Tone. -- Dr Tony McDonald, Asst Director, FMSC. 0191 246 4543 Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has no attribute 'setHeader'
Thanks again for the reply Dieter, On 6 Feb 2004, at 21:14, Dieter Maurer wrote: "REQUEST.RESPONSE" is set up in "ZServer.HTTPServer.zhttp_handler.continue_request". It should be impossible that is is "None". Agreed. Maybe, we have a memory corruption. I have seen objects magically becoming "None" in Python versions with memory corruption problems (Python 2.1.1). -- Dieter Could be memory perhaps, but this is python2.3.3. Christian Heimes wrote: [...] And the next one: Python2.3.3/Zope2.70rc2/Plone2rc5. Exception Type AttributeError Exception Value 'str' object has no attribute 'RESPONSE' [...] Module Products.CMFPhoto.Photo, line 510, in clearCache AttributeError: 'str' object has no attribute 'RESPONSE' The relevant code line is self.REQUEST.RESPONSE.setHeader(). The error occured at object creation. Something really bad is going on! Christian The problem I'm having is that these are all stock Zope products from a Zope2.7.0rc2 release. The traceback is coming from the Zope core. Traceback (innermost last): ... Module Shared.DC.Scripts.Bindings, line 320, in __render_with_namespace__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module App.special_dtml, line 175, in _exec Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: RESPONSE Module , line 0, in ? AttributeError: 'NoneType' object has no attribute 'setHeader' This also seems different from what Christian is reporting; Christian Heimes wrote at 2004-2-6 23:01 +0100: And the next one: Python2.3.3/Zope2.70rc2/Plone2rc5. Exception Type AttributeError Exception Value 'str' object has no attribute 'RESPONSE' [...] Module Products.CMFPhoto.Photo, line 510, in clearCache AttributeError: 'str' object has no attribute 'RESPONSE' The relevant code line is self.REQUEST.RESPONSE.setHeader(). The error occured at object creation. Something really bad is going on! So, I'm still baffled by this. Many thanks to all those providing more data points. I *think* this is a 'Zope' thing and not a 'Tone' thing, but I've been wrong in that area before ;) cheers tone. -- Dr Tony McDonald, Asst Director, FMSC. 0191 245 4223 Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has no attribute 'setHeader'
Thanks for the response Dieter, On 5 Feb 2004, at 18:51, Dieter Maurer wrote: Tony McDonald wrote at 2004-2-5 12:43 +: ... We have an index_html (initially DTML document, then tried method) that can be created (located at /prototype/myporfolio/index_html), have it's security settings changed quite happily. Then when the object is called we get the error in the subject line. The system specs are; ... and the traceback is; Traceback (innermost last): ... Module Shared.DC.Scripts.Bindings, line 320, in __render_with_namespace__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module App.special_dtml, line 175, in _exec Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: RESPONSE Module , line 0, in ? AttributeError: 'NoneType' object has no attribute 'setHeader' Looks like "RESPONSE" is "None". I do not see how this can happen... Exactly! - this is why I said I'd never seen this before. It's a 2.6.1 Data.fs that's been dropped into a stock 2.7.0rc2 release and I get this error. I have no idea why this is happening, so I was hoping that it was an artifact of the 2.7.0rc2 release itself. Probably, I would start debugging. Quite likely, but I have *no* idea where to start with this. All the modules mentioned in the trackback are Zope supplied ones, not third party ones, so I'd assumed it might be the core software. -- Dieter once again, thanks for the reply Dieter. tone. -- Dr Tony McDonald, Asst Director, FMSC. 0191 245 4223 Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
[Zope-dev] Zope2.7.0rc2 AttributeError: 'NoneType' object has no attribute 'setHeader'
Hi all, We're in the process of migrating our sites to 2.7, so to get the guys up to speed we picked a site at random today. Did the /usr/local/zope/bin/mkzopeinstance.py jig (works very well), copied the Data.fs, some external methods, a Zwiki product and were good to go. This is from a Zope-2.6.1 site. We found out that LocalFS needed updating, so found a 2.7 compatible version and installed that. http://www.my-zope.org/Members/kedai/LocalFS-1-1-0.tgz/file_view Now we have a very peculiar error, that I'm not posting to the Zope list as it's the RC2 version of Zope2.7 that we're using. We have an index_html (initially DTML document, then tried method) that can be created (located at /prototype/myporfolio/index_html), have it's security settings changed quite happily. Then when the object is called we get the error in the subject line. The system specs are; Zope Version (2.7.0rc2, python 2.3.3, sunos5) Python Version 2.3.3 (#3, Jan 23 2004, 13:36:43) [GCC 2.95.3 20010315 (release)] System Platform sunos5 SOFTWARE_HOME /usr/local/zope/lib/python ZOPE_HOME /usr/local/zope and the traceback is; Traceback (innermost last): Module ZPublisher.Publish, line 100, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Shared.DC.Scripts.Bindings, line 306, in __call__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module App.special_dtml, line 175, in _exec Module Shared.DC.Scripts.Bindings, line 320, in __render_with_namespace__ Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec Module App.special_dtml, line 175, in _exec Module DocumentTemplate.DT_Util, line 201, in eval - __traceback_info__: RESPONSE Module , line 0, in ? AttributeError: 'NoneType' object has no attribute 'setHeader' I have never seen anything like this from Zope before (been using it since 1.0.3 so I've seen it do quite a bit! :). I've looked through the zope-dev archives and can't find anything related (unless it's got something to do with manage_page_charset not being callable? The only thing I could find on the collector was issue 381, http://collector.zope.org/Zope/381 'HEAD request method broken' - but that doesn't seem relevant in this condition. *Any* thoughts would be gratefully received. To recap, we took a pretty plain 2.6.1 site, loaded it into 2.7.0rc2 and get the traceback above... cheers tone. -- Dr Tony McDonald, Asst Director, FMSC. 0191 245 4223 Project Manager, FDTL-4 ePortfolios http://www.eportfolios.ac.uk/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] Call Profiler
On 1/2/02 1:13 am, "Richard Jones" <[EMAIL PROTECTED]> wrote: > I've just announced our Call Profiler product on zope.org and the zope > announce list (waiting for people in different timezones to authorise them :) > ( http://www.zope.org/Members/richard/CallProfiler/ for the impatient) > [snip] > Any comments? > I've been using it for *5* minutes and have found a method that was taking 95%! of one of our most often used scripts and another python script that was effectively stalling the servergobsmacked. Huge kudos and thanks to Richard!! :) Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )
[Zope-dev] Upgrading to python 2.1.2 and Zope 2.5b4
Hi all, I want to upgrade to python 2.1.2 (from an existing 2.1 installation) and at the same time upgrade to 2.5b4 in the hopes that this combination will fix the threading problem under Solaris. Q1: Is this the right combination to use, I've read that I should use 2.1.2 and 2.4.4 (possible numbering scheme). If so, I can wait (but we are getting core dumps regularly now) Q2: (and apologies, as this is a more python-orientated question) Can I just do a 'make install' of python 2.1.2 and be sure that it's not going to make my MySQL and other modules in site-packages unusable? (sorry if this is a daft question - I have a *lot* of zope sites using python 2.1 at the moment) Many thanks Tone -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )
Re: [Zope-dev] 100k+ objects, or...Improving Performance ofBTreeFolder...
On 10/12/01 2:54 pm, "Phillip J. Eby" <[EMAIL PROTECTED]> wrote: > I'm not sure if this is taken into consideration in your work so far/future > plans... but just in case you were unaware, it is not necessary for you to > persistently store objects in the ZODB that you intend to index in a > ZCatalog. All that is required is that the object to be cataloged is > accessible via a URL path. ZSQL methods can be set up to be > URL-traversable, and to wrap a class around the returned row. To load the > items into the catalog, you can use a PythonScript or similar to loop over > a multi-row query, passing the objects directly to the catalog along with a > path that matches the one they'll be retrievable from. This approach would > eliminate the need for BTreeFolder altogether, although of course it > requires access to the RDBMS for retrievals. This should reduce the number > of writes and allow for bigger subtransactions in a given quantity of memory. Gad! - are you saying you don't need to store a 1Mb .doc file into the ZODB, but can still index the thing, store the index information in the Zcatalog (presumably a lot smaller than 1Mb) and have the actual file accessible from a file system URL? If so, that's really neat! We're using Kaivo's document library and think it's great, but don't want to store loads of files into the ZODB, preferring to keep them in a file system (we want a lot of people to use the system and are worried about the ZODB becoming gargantuan). Tone -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )
[Zope-dev] Where to put time.sleep(0.01) to get around solaris threadingissue?
ontrib/bobo_handler.py: thread.start_new_thread(self._continue_request,(sin,request)) ./ZServer/medusa/monitor_client_win32.py:thread.start_new_thread (reader, (l, s, p)) ./ZServer/medusa/thread/select_trigger.py: thread.start_new_thread (thread_function, (tf, self.count, n)) ./ZServer/medusa/thread/thread_channel.py:thread.start_new_thread ( ./lib/python/ZODB/bpthread.py:start_new_thread=apply And pointed a zope Data.fs that has the test methods at this new distribution. No joy. That is, testing the 'sleeper' script still blocks other requests until it is finished, when those requests are then serviced. Can anyone see what I'm doing wrong here? Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )