Description

Describe the bug...

After upgrading version 1.0 to the latest one (Version 1.2.3), the newly created instance is fine. However when trying to access the existing instance created with version 1.0 previously, the following errors appear (or see the attached html sample page moin-error.html for clearer view):

 --> -->


TypeError'int' object is not callable   Please include this information in your bug reports!:
Python Python 2.2.2: /usr/bin/python2
Linux lxtm2 2.4.20-30.9 #1 Wed Feb 4 20:44:26 EST 2004 i686
MoinMoin Release 1.2.3 [Revision 1.186]
Fri Sep 3 13:42:52 2004

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.2/site-packages/MoinMoin/request.py in run(self=<MoinMoin.request.RequestCGI instance>)
  454             else:
  455                 try:
  456                     cgitb.Hook(file=self).handle(saved_exc)
  457                     # was: cgitb.handler()
  458                 except:
cgitb = <module 'MoinMoin.support.cgitb' from '/usr/lib/python2.2/site-packages/MoinMoin/support/cgitb.pyc'>, cgitb.Hook = <class MoinMoin.support.cgitb.Hook>, file undefined, self = <MoinMoin.request.RequestCGI instance>, ).handle undefined, saved_exc = (<class exceptions.TypeError>, <exceptions.TypeError instance>, <traceback object>)

 /usr/lib/python2.2/site-packages/MoinMoin/Page.py in send_page(self=<MoinMoin.Page.Page instance>, request=<MoinMoin.request.RequestCGI instance>, msg='', **keywords={'count_hit': 1})
  572                 wikiutil.send_title(request, title, link=link, msg=msg,
  573                     pagename=self.page_name, print_mode=print_mode, pi_refresh=pi_refresh,
  574                     allow_doubleclick=1, trail=trail)
  575
  576                 # user-defined form preview?
allow_doubleclick undefined, trail = None

 /usr/lib/python2.2/site-packages/MoinMoin/wikiutil.py in send_title(request=<MoinMoin.request.RequestCGI instance>, text='FrontPage', **keywords={'allow_doubleclick': 1, 'link': '/scisat/FrontPage?action=fullsearch&amp;value=FrontPage&amp;literal=1&amp;case=1&amp;context=40', 'msg': '', 'pagename': 'FrontPage', 'pi_refresh': None, 'print_mode': 0, 'trail': None})
  963     if keywords.has_key('body_attr'):
  964         bodyattr += ' ' + keywords['body_attr']
  965     if keywords.get('allow_doubleclick', 0) and not keywords.get('print_mode', 0) \
  966             and pagename and request.user.may.edit(pagename) \
  967             and request.user.edit_on_doubleclick:
keywords = {'allow_doubleclick': 1, 'link': '/scisat/FrontPage?action=fullsearch&amp;value=FrontPage&amp;literal=1&amp;case=1&amp;context=40', 'msg': '', 'pagename': 'FrontPage', 'pi_refresh': None, 'print_mode': 0, 'trail': None}, keywords.get = <built-in method get of dict object>, pagename = 'FrontPage', request = <MoinMoin.request.RequestCGI instance>, request.user = <MoinMoin.user.User instance>, request.user.may = <moin_config.SecurityPolicy instance>, request.user.may.edit = 1, request.user.edit_on_doubleclick = 0

TypeError: 'int' object is not callable
      __doc__ = 'Inappropriate argument type.'
      __getitem__ = <bound method TypeError.__getitem__ of <exceptions.TypeError instance>>
      __init__ = <bound method TypeError.__init__ of <exceptions.TypeError instance>>
      __module__ = 'exceptions'
      __str__ = <bound method TypeError.__str__ of <exceptions.TypeError instance>>
      args = ("'int' object is not callable",)

Example

Here is the error page shown in browser.

moin-error.html

Details

MoinMoin Version

Workaround

Discussion

I guess this is the problem:

request.user.may = <moin_config.SecurityPolicy instance>, request.user.may.edit = 1

You have defined a new SecurityPolicy class in your moin_config.py. The interface of this class has changed. Comment out this SecurityPolicy to verify that this is the problem and adjust your SecurityPolicy to the new interface afterwards. see MoinMoin/security.py

Plan


CategoryMoinMoinNoBug

MoinMoin: MoinMoinBugs/UpgradeFromVersion1 (last edited 2008-06-08 16:28:32 by 70)