Mailing List Archive

cache_detail crash
Good day.

I'm using zope 2.13 and all is working fine.

But when i going:
http://localhost:8080/Control_Panel/Database/cache_detail

I got Site Error with this traceback:
"""
Traceback (innermost last):
Module ZPublisher.Publish, line 126, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 46, in call_object
Module App.CacheManager, line 105, in cache_detail
Module App.CacheManager, line 105, in <genexpr>
TypeError: %d format: a number is required, not str
"""

Can anybody reproduce this?

Relevant components versions:
zope.publisher-3.12.6
Products.StandardCacheManagers-2.13.0

Thanks.

--
Regards,
Ruslan

Tinderboxing kills... the drives.
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )
Re: cache_detail crash [ In reply to ]
On Thu, Sep 22, 2011 at 10:21 AM, Ruslan Mahmatkhanov <cvs-src@yandex.ru> wrote:
> Can anybody reproduce this?

Yes, it's a known bug reported at https://bugs.launchpad.net/zope2/+bug/838978

Patches are very welcome for this.

Hanno
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )
Re: cache_detail crash [ In reply to ]
Hanno Schlichting wrote on 22.09.2011 12:34:
> On Thu, Sep 22, 2011 at 10:21 AM, Ruslan Mahmatkhanov<cvs-src@yandex.ru> wrote:
>> Can anybody reproduce this?
>
> Yes, it's a known bug reported at https://bugs.launchpad.net/zope2/+bug/838978
>
> Patches are very welcome for this.
>
> Hanno

Ok, this change works for me.

It should be applied against src/App/CacheManager.py.
Would you mind to commit it?

--
Regards,
Ruslan

Tinderboxing kills... the drives.
Re: cache_detail crash [ In reply to ]
On Thu, Sep 22, 2011 at 12:59:43PM +0400, Ruslan Mahmatkhanov wrote:
> Ok, this change works for me.
>
> It should be applied against src/App/CacheManager.py.
> Would you mind to commit it?

> REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')
> - return '\n'.join('%6d %s'%(count, name) for count, name in detail)
> + return '\n'.join('%s %6d'%(count, name) for count, name in detail)

This doesn't look right! So count is %s, and name is %d? Perhaps
their order in detail changed?

Albertas
_______________________________________________
Zope-Dev maillist - Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists -
https://mail.zope.org/mailman/listinfo/zope-announce
https://mail.zope.org/mailman/listinfo/zope )
Re: cache_detail crash [ In reply to ]
Albertas Agejevas wrote on 22.09.2011 13:05:
> On Thu, Sep 22, 2011 at 12:59:43PM +0400, Ruslan Mahmatkhanov wrote:
>> Ok, this change works for me.
>>
>> It should be applied against src/App/CacheManager.py.
>> Would you mind to commit it?
>
>> REQUEST.RESPONSE.setHeader('Content-Type', 'text/plain')
>> - return '\n'.join('%6d %s'%(count, name) for count, name in detail)
>> + return '\n'.join('%s %6d'%(count, name) for count, name in detail)
>
> This doesn't look right! So count is %s, and name is %d? Perhaps
> their order in detail changed?
>
> Albertas

detail is looks like that:

[('AccessControl.users.User', 3),
('App.ApplicationManager.ApplicationManager', 3),
..... ]

So if the count still should go first, this patch should work.

--
Regards,
Ruslan

Tinderboxing kills... the drives.