[Zope] AttributeError: 'NoneType' object has no attribute 'lower'
when sorting using ...tal:repeat subsection python:sequence.sort(subsections,(('title','nocase','asc'),))I get the following error: Module DocumentTemplate.sequence.SortEx, line 134 in nocase AttributeError: 'NoneType' object has no attribute 'lower' When I switch the 'nocase' to 'cmp' the sort defaults to sorting by orderof entry or something. Any help would be greatly appreciated. Thanks. ___ 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] AttributeError: 'NoneType' object has no attribute 'lower'
I suspect that one item in your 'subsections' variable is None. Try:tal:repeat subsection python:sequence.sort([x for x in subsections if not None],(('title','nocase','asc'),)) On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: when sorting using ...tal:repeat subsection python:sequence.sort(subsections,(('title','nocase','asc'),)) I get the following error: Module DocumentTemplate.sequence.SortEx, line 134 in nocase AttributeError: 'NoneType' object has no attribute 'lower' When I switch the 'nocase' to 'cmp' the sort defaults to sorting by order of entry or something. Any help would be greatly appreciated. Thanks. ___ 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ 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] AttributeError: 'NoneType' object has no attribute 'lower'
I found no empty titles. Any other ideas? On 11/10/05, Peter Bengtsson [EMAIL PROTECTED] wrote: I suspect that one item in your 'subsections' variable is None.Try:tal:repeat subsection python:sequence.sort ([x for x in subsectionsif not None],(('title','nocase','asc'),))On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: when sorting using ...tal:repeat subsection python:sequence.sort(subsections,(('title','nocase','asc'),)) I get the following error: Module DocumentTemplate.sequence.SortEx, line 134 in nocase AttributeError: 'NoneType' object has no attribute 'lower' When I switch the 'nocase' to 'cmp' the sort defaults to sorting by order of entry or something. Any help would be greatly appreciated. Thanks. ___ 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-announcehttp://mail.zope.org/mailman/listinfo/zope-dev )--Peter Bengtsson,work www.fry-it.comhome www.peterbe.comhobby www.issuetrackerproduct.com ___ 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] AttributeError: 'NoneType' object has no attribute 'lower'
It appears that Zope/Plone is not seeing anything in 'title'. I can put 'blahblah' in the code and get the same error. On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: I found no empty titles. Any other ideas? On 11/10/05, Peter Bengtsson [EMAIL PROTECTED] wrote: I suspect that one item in your 'subsections' variable is None.Try:tal:repeat subsection python:sequence.sort ([x for x in subsectionsif not None],(('title','nocase','asc'),))On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: when sorting using ...tal:repeat subsection python:sequence.sort(subsections,(('title','nocase','asc'),)) I get the following error: Module DocumentTemplate.sequence.SortEx, line 134 in nocase AttributeError: 'NoneType' object has no attribute 'lower' When I switch the 'nocase' to 'cmp' the sort defaults to sorting by order of entry or something. Any help would be greatly appreciated. Thanks. ___ 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 ) --Peter Bengtsson,work www.fry-it.comhome www.peterbe.comhobby www.issuetrackerproduct.com ___ 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] AttributeError: 'NoneType' object has no attribute 'lower'
Just do a br tal:replace=subsections / and let us know what it returns. On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: I found no empty titles. Any other ideas? On 11/10/05, Peter Bengtsson [EMAIL PROTECTED] wrote: I suspect that one item in your 'subsections' variable is None. Try:tal:repeat subsection python:sequence.sort ([x for x in subsections if not None],(('title','nocase','asc'),)) On 11/10/05, Larry Lay [EMAIL PROTECTED] wrote: when sorting using ...tal:repeat subsection python:sequence.sort(subsections,(('title','nocase','asc'),)) I get the following error: Module DocumentTemplate.sequence.SortEx, line 134 in nocase AttributeError: 'NoneType' object has no attribute 'lower' When I switch the 'nocase' to 'cmp' the sort defaults to sorting by order of entry or something. Any help would be greatly appreciated. Thanks. ___ 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 ) -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com -- Peter Bengtsson, work www.fry-it.com home www.peterbe.com hobby www.issuetrackerproduct.com ___ 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] AttributeError: 'NoneType' object has no attribute 'lower'
At Thursday 10/11/2005 12:08, Larry Lay wrote: I found no empty titles. Any other ideas? On 11/10/05, Peter Bengtsson mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: I suspect that one item in your 'subsections' variable is None. Try:tal:repeat subsection python:sequence.sort ([x for x in subsections if not None],(('title','nocase','asc'),)) Note the typo (which was valid Python code anyway so might go undetected), should be: python:sequence.sort([x for x in subsections if x is not None],(('title','nocase','asc'),)) Gabriel Genellina Softlab SRL ___ 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 )