Description

"Login to edit" leads to a button to push which leads to

"TypeError

init() takes exactly 2 arguments (3 given)"

Steps to reproduce

I suspect this has to do with the user name in the system being whit+launchpad - that is, with a + in the middle, based on the e-mail address I registered with. However there's no way evident from this login page to change the user name to see if that would fix it.

Details

Traceback

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

   1.

      /var/lib/python-support/python2.5/MoinMoin/request/request_fcgi.py in __init__ (self=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, fcgRequest=<MoinMoin.support.thfcgi.Request instance at 0x183f248>, env={'DOCUMENT_ROOT': '/srv/help.ubuntu.com/www', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=259200', 'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'MOIN_SESSION=yjb_5b6inqh9ktdtxjo1_bt-lno18-ru', 'HTTP_HOST': 'help.ubuntu.com', ...}, form=FieldStorage(None, None, [MiniFieldStorage('acti...orage('openid.sreg.nickname', 'whit+launchpad')]), properties={})
         1. 26 self.fcgform = form
         2. 27 self._setup_vars_from_std_env(env)
         3. 28 RequestBase.__init__(self, properties)
         4. 29
         5. 30 except Exception, err:
          * global RequestBase = <class 'MoinMoin.request.RequestBase'>
          * RequestBase.__init__ = <unbound method RequestBase.__init__>
          * self = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
          * properties = {}
   2.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in __init__ (self=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, properties={})
         1. 205 # set self.user even if _handle_auth_form raises an Exception
         2. 206 self.user = None
         3. 207 self.user = self._handle_auth_form(user_obj)
         4. 208 del user_obj
         5. 209 self.cfg.session_handler.after_auth(self, self.cfg.session_id_handler, self.user)
          * self = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
          * self.user = None
          * self._handle_auth_form = <bound method Request._handle_auth_form of <Moin...equest.request_fcgi.Request object at 0x1bbc390>>
          * user_obj = None
   3.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in _handle_auth_form (self=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, user_obj=None)
         1. 610 return self.handle_auth(user_obj, attended=True, username=username,
         2. 611 password=password, login=login, logout=logout,
         3. 612 stage=stage, openid_identifier=oid)
         4. 613
         5. 614 def handle_auth(self, user_obj, attended=False, **kw):
          * stage = u'openid'
          * openid_identifier undefined
          * oid = None
   4.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in handle_auth (self=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, user_obj=None, attended=True, **kw={'login': True, 'logout': False, 'openid_identifier': None, 'password': None, 'stage': u'openid', 'username': None})
         1. 642 if stage and authmethod.name != stage:
         2. 643 continue
         3. 644 ret = authmethod.login(self, user_obj, **extra)
         4. 645 user_obj = ret.user_obj
         5. 646 cont = ret.continue_flag
          * ret undefined
          * authmethod = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>
          * authmethod.login = <bound method OpenIDAuth.login of <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>>
          * self = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
          * user_obj = None
          * extra = {'attended': True, 'cookie': <SimpleCookie: MOIN_SESSION='yjb_5b6inqh9ktdtxjo1_bt-lno18-ru'>, 'multistage': True, 'openid_identifier': None, 'password': None, 'username': None}
   5.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in login (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>, request=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, user_obj=None, **kw={'attended': True, 'cookie': <SimpleCookie: MOIN_SESSION='yjb_5b6inqh9ktdtxjo1_bt-lno18-ru'>, 'multistage': True, 'openid_identifier': None, 'password': None, 'username': None})
         1. 324
         2. 325 if continuation:
         3. 326 return self._handle_continuation(request)
         4. 327
         5. 328 # openid is designed to work together with other auths
          * self = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>
          * self._handle_continuation = <bound method OpenIDAuth._handle_continuation of...n.auth.openidrp.OpenIDAuth instance at 0xddd050>>
          * request = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
   6.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in _handle_continuation (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>, request=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>)
         1. 299 oidstage = request.form.get('oidstage', [0])[0]
         2. 300 if oidstage == '1':
         3. 301 return self._handle_verify_continuation(request)
         4. 302 elif oidstage == '2':
         5. 303 return self._handle_name_continuation(request)
          * self = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>
          * self._handle_verify_continuation = <bound method OpenIDAuth._handle_verify_continua...n.auth.openidrp.OpenIDAuth instance at 0xddd050>>
          * request = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
   7.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in _handle_verify_continuation (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>, request=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>)
         1. 214 # possibly associating an existing account.
         2. 215 if sreg_resp:
         3. 216 return self._handle_name_continuation(request, sreg, teams)
         4. 217 else:
         5. 218 return MultistageFormLogin(self._get_account_name)
          * self = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>
          * self._handle_name_continuation = <bound method OpenIDAuth._handle_name_continuati...n.auth.openidrp.OpenIDAuth instance at 0xddd050>>
          * request = <MoinMoin.request.request_fcgi.Request object at 0x1bbc390>
          * sreg = {'country': '', 'dob': '0000-00-00', 'email': u'whit+launchpad@domain.com', 'fullname': u'Whit Blauvelt', 'gender': '', 'language': '', 'nickname': u'whit+launchpad', 'postcode': '', 'timezone': ''}
          * teams = None
   8.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in _handle_name_continuation (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xddd050>, request=<MoinMoin.request.request_fcgi.Request object at 0x1bbc390>, sreg={'country': '', 'dob': '0000-00-00', 'email': u'whit+launchpad@domain.com', 'fullname': u'Whit Blauvelt', 'gender': '', 'language': '', 'nickname': u'whit+launchpad', 'postcode': '', 'timezone': ''}, teams=None)
         1. 235 if not user.isValidName(request, newname):
         2. 236 return MultistageFormLogin(self._get_account_name,
         3. 237 _('This is not a valid username, choose a different one.'))
         4. 238 uid = None
         5. 239 if newname:
          * _ = <function <lambda> at 0x1bb4a28>

TypeError

__init__() takes exactly 2 arguments (3 given)

    * args = ('__init__() takes exactly 2 arguments (3 given)',)
    * message = '__init__() takes exactly 2 arguments (3 given)'

System Details

    * Date: Sat, 17 Jul 2010 00:49:13 +0000
    * Platform: Linux acerola 2.6.24-23-server #1 SMP Wed Apr 1 22:14:30 UTC 2009 x86_64
    * Python: Python 2.5.2 (/usr/bin/python)
    * MoinMoin: Release 1.6.3 (release)

Another:

TypeError

__init__() takes exactly 2 arguments (1 given)

If you want to report a bug, please save this page and attach it to your bug report.

    * Show debugging information
    * Report bug
    * Visit MoinMoin wiki

Traceback

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

   1.

      /var/lib/python-support/python2.5/MoinMoin/request/request_fcgi.py in __init__ (self=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>, fcgRequest=<MoinMoin.support.thfcgi.Request instance at 0x115d200>, env={'CONTENT_LENGTH': '106', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'DOCUMENT_ROOT': '/srv/dev.launchpad.net/www/htdocs/', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5', 'HTTP_CACHE_CONTROL': 'max-age=259200', 'HTTP_CONNECTION': 'keep-alive', ...}, form=FieldStorage(None, None, [MiniFieldStorage('logi...niFieldStorage('submit', 'Associate this name')]), properties={'script_name': '/'})
         1. 26 self.fcgform = form
         2. 27 self._setup_vars_from_std_env(env)
         3. 28 RequestBase.__init__(self, properties)
         4. 29
         5. 30 except Exception, err:
          * global RequestBase = <class 'MoinMoin.request.RequestBase'>
          * RequestBase.__init__ = <unbound method RequestBase.__init__>
          * self = <MoinMoin.request.request_fcgi.Request object at 0x10fda90>
          * properties = {'script_name': '/'}
   2.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in __init__ (self=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>, properties={'script_name': '/'})
         1. 205 # set self.user even if _handle_auth_form raises an Exception
         2. 206 self.user = None
         3. 207 self.user = self._handle_auth_form(user_obj)
         4. 208 del user_obj
         5. 209 self.cfg.session_handler.after_auth(self, self.cfg.session_id_handler, self.user)
          * self = <MoinMoin.request.request_fcgi.Request object at 0x10fda90>
          * self.user = None
          * self._handle_auth_form = <bound method Request._handle_auth_form of <Moin...equest.request_fcgi.Request object at 0x10fda90>>
          * user_obj = <MoinMoin.user.User at 0x1161998 name:u'sumanah' valid:1>
   3.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in _handle_auth_form (self=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>, user_obj=<MoinMoin.user.User at 0x1161998 name:u'sumanah' valid:1>)
         1. 610 return self.handle_auth(user_obj, attended=True, username=username,
         2. 611 password=password, login=login, logout=logout,
         3. 612 stage=stage, openid_identifier=oid)
         4. 613
         5. 614 def handle_auth(self, user_obj, attended=False, **kw):
          * stage = u'openid'
          * openid_identifier undefined
          * oid = None
   4.

      /var/lib/python-support/python2.5/MoinMoin/request/__init__.py in handle_auth (self=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>, user_obj=<MoinMoin.user.User at 0x1161998 name:u'sumanah' valid:1>, attended=True, **kw={'login': True, 'logout': False, 'openid_identifier': None, 'password': u'[redacted]', 'stage': u'openid', 'username': None})
         1. 642 if stage and authmethod.name != stage:
         2. 643 continue
         3. 644 ret = authmethod.login(self, user_obj, **extra)
         4. 645 user_obj = ret.user_obj
         5. 646 cont = ret.continue_flag
          * ret undefined
          * authmethod = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>
          * authmethod.login = <bound method OpenIDAuth.login of <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>>
          * self = <MoinMoin.request.request_fcgi.Request object at 0x10fda90>
          * user_obj = <MoinMoin.user.User at 0x1161998 name:u'sumanah' valid:1>
          * extra = {'attended': True, 'cookie': <SimpleCookie: MOIN_SESSION='bflsyckrb1ibtx8n8mf...yfT7alXvzY..BFkCfQq0hCEYMpWuYIWxdbEqofeWGuIeDzs'>, 'multistage': True, 'openid_identifier': None, 'password': u'[redacted]', 'username': None}
   5.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in login (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>, request=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>, user_obj=<MoinMoin.user.User at 0x1161998 name:u'sumanah' valid:1>, **kw={'attended': True, 'cookie': <SimpleCookie: MOIN_SESSION='bflsyckrb1ibtx8n8mf...yfT7alXvzY..BFkCfQq0hCEYMpWuYIWxdbEqofeWGuIeDzs'>, 'multistage': True, 'openid_identifier': None, 'password': u'[redacted]', 'username': None})
         1. 324
         2. 325 if continuation:
         3. 326 return self._handle_continuation(request)
         4. 327
         5. 328 # openid is designed to work together with other auths
          * self = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>
          * self._handle_continuation = <bound method OpenIDAuth._handle_continuation of...n.auth.openidrp.OpenIDAuth instance at 0xbeff38>>
          * request = <MoinMoin.request.request_fcgi.Request object at 0x10fda90>
   6.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in _handle_continuation (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>, request=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>)
         1. 303 return self._handle_name_continuation(request)
         2. 304 elif oidstage == '3':
         3. 305 return self._handle_associate_continuation(request)
         4. 306 return CancelLogin()
         5. 307
          * self = <MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>
          * self._handle_associate_continuation = <bound method OpenIDAuth._handle_associate_conti...n.auth.openidrp.OpenIDAuth instance at 0xbeff38>>
          * request = <MoinMoin.request.request_fcgi.Request object at 0x10fda90>
   7.

      /var/lib/python-support/python2.5/MoinMoin/auth/openidrp.py in _handle_associate_continuation (self=<MoinMoin.auth.openidrp.OpenIDAuth instance at 0xbeff38>, request=<MoinMoin.request.request_fcgi.Request object at 0x10fda90>)
         1. 271 def _handle_associate_continuation(self, request):
         2. 272 if not 'openid.id' in request.session:
         3. 273 return CancelLogin()
         4. 274
         5. 275 _ = request.getText
          * global CancelLogin = <class 'MoinMoin.auth.CancelLogin'>

TypeError

__init__() takes exactly 2 arguments (1 given)

    * args = ('__init__() takes exactly 2 arguments (1 given)',)
    * message = '__init__() takes exactly 2 arguments (1 given)'

System Details

    * Date: Fri, 15 Jul 2011 13:29:46 +0000
    * Platform: Linux acerola 2.6.24-28-server #1 SMP Thu Sep 16 14:49:46 UTC 2010 x86_64
    * Python: Python 2.5.2 (/usr/bin/python)
    * MoinMoin: Release 1.6.3 (release)

MoinMoin Version

OS and Version

Python Version

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Discussion

2008-08-03 MoinMoin 1.6.4 released! There will be no fixes in the 1.6 branch after 1.6.4. Please upgrade to a recent moin version if you like bug and security fixes.

2011-04-27 So what do you want us to do? Is this fixed in a later release? Should we pressure Ubuntu to upgrade? Will it help?

In general, the openid stuff isn't used much by the moin developers themselves. Ubuntu's openid stuff might be even more special, because they integrated it with launchpad, so it might be even a problem in their special code (not sure, didn't look at it in detail). What the above comment tried to point out, is that we won't fix any bugs in outdated releases. The current release series is 1.9.x and bugs will be fixed there, if we can reproduce them with the current release (if they happen to be in the released code). Please understand we don't have the resources to support many releases at the same time, thus we concentrate on the current stable release (1.9) and on the current development (moin-2.0) repo. -- ThomasWaldmann 2011-04-27 13:49:48

I don't mind seeing if this has anything to do with various other OpenID issues, but I'd first have to know which __init__ method is causing the problem. Is it the MultistageFormLogin initialiser? I did make some minor request API fixes around OpenID, suggesting that the code doesn't get so much exercise, but this might be some bigger change either from 1.8 to 1.9 or in the Ubuntu code. -- PaulBoddie 2011-04-27 22:46:27

Version 1.6.3 is outdated and it is a good idea to update to a new version. OpenID was refactored by Rowan Kerr for 1.9. Please check if you have your problem finding also in that version. ReimarBauer/Photo/img.png -- ReimarBauer 2011-07-15 20:07:12

Plan


CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/OpenID login to Ubuntu wiki fails (last edited 2011-07-15 20:10:38 by ReimarBauer)