Ubuntu Wiki Error: "IndexErrorstring index out of range"

Bug #57894 reported by Joey Stanford
18
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Website - OBSOLETE
Fix Released
Medium
Unassigned

Bug Description

I am recieving this today on post and preview commands only.

------------------------------------------------------ error output ---------------------

 --> -->

IndexErrorstring index out of range Please include this information in your bug reports!:
Python Python 2.4.1: /usr/bin/python
Linux palmer 2.6.15.7 #1 SMP Sat Jul 15 10:43:55 UTC 2006 i686
MoinMoin Release 1.3.4 [Revision 1.3.4 release]
Sun Aug 27 17:49:25 2006

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.4/site-packages/MoinMoin/request.py in run(self=<MoinMoin.request.RequestModPy instance>)
  845 from MoinMoin.wikiaction import getHandler
  846 handler = getHandler(self, action)
  847 handler(self.page.page_name, self)
  848
  849 # 5. Or redirect to another page
handler = <function do_savepage>, self = <MoinMoin.request.RequestModPy instance>, self.page = <MoinMoin.Page.Page instance>, self.page.page_name = u'JoeyStanford/UbuntuFAQs'

 /usr/lib/python2.4/site-packages/MoinMoin/wikiaction.py in do_savepage(pagename=u'JoeyStanford/UbuntuFAQs', request=<MoinMoin.request.RequestModPy instance>)
  605 try:
  606 savemsg = pg.saveText(savetext, rev, trivial=trivial,
  607 comment=comment)
  608 except pg.EditConflict, msg:
  609 # Handle conflict and send editor
comment = u'kbd error fix'

 /usr/lib/python2.4/site-packages/MoinMoin/PageEditor.py in saveText(self=<MoinMoin.PageEditor.PageEditor instance>, newtext=u'= Ubuntu FAQs =\n||<tablestyle="float:right; fon...=1429205#post1429205 here] on the Ubuntu Forums.\n', rev=34, **kw={'comment': u'kbd error fix', 'trivial': 0})
  940 # send notification mails
  941 if self.request.cfg.mail_smarthost:
  942 msg = msg + self._notifySubscribers(comment, trivial)
  943
  944 # remove lock (forcibly if we were allowed to break it by the UI)
msg = u'Thank you for your changes. Your attention to detail is appreciated.', self = <MoinMoin.PageEditor.PageEditor instance>, self._notifySubscribers = <bound method PageEditor._notifySubscribers of <MoinMoin.PageEditor.PageEditor instance>>, comment = u'kbd error fix', trivial = 0

 /usr/lib/python2.4/site-packages/MoinMoin/PageEditor.py in _notifySubscribers(self=<MoinMoin.PageEditor.PageEditor instance>, comment=u'kbd error fix', trivial=0)
  570 _ = self._
  571 subscribers = self.getSubscribers(self.request, return_users=1,
  572 trivial=trivial)
  573 if subscribers:
  574 # get a list of old revisions, and append a diff
trivial = 0

 /usr/lib/python2.4/site-packages/MoinMoin/Page.py in getSubscribers(self=<MoinMoin.PageEditor.PageEditor instance>, request=<MoinMoin.request.RequestModPy instance>, **kw={'return_users': 1, 'trivial': 0})
  887 for uid in userlist:
  888 if uid == request.user.id and not include_self: continue # no self notification
  889 subscriber = user.User(request, uid, prefs_only=True)
  890
  891 ## This is a bit wrong if return_users=1 (which implies that the caller will process
subscriber = <MoinMoin.user.User instance>, global user = <module 'MoinMoin.user' from '/usr/lib/python2.4/site-packages/MoinMoin/user.pyc'>, user.User = <class MoinMoin.user.User>, request = <MoinMoin.request.RequestModPy instance>, uid = '775843', prefs_only undefined, True undefined

 /usr/lib/python2.4/site-packages/MoinMoin/user.py in __init__(self=<MoinMoin.user.User instance>, request=<MoinMoin.request.RequestModPy instance>, id='775843', name='', password=None, auth_username='', prefs_only=True)
  305
  306 if self.id:
  307 self.load_from_id()
  308 if self.name == self.auth_username:
  309 self.trusted = 1
self = <MoinMoin.user.User instance>, self.load_from_id = <bound method User.load_from_id of <MoinMoin.user.User instance>>

 /usr/lib/python2.4/site-packages/MoinMoin/user.py in load_from_id(self=<MoinMoin.user.User instance>, check_pass=0)
  406 # XXX: uncomment this!
  407 #assert auth_data['wikiname'], 'No wikiname for user %r!' % self.id
  408 self._load_from_auth_data(auth_data)
  409
  410 def _load_from_auth_data(self, auth_data):
self = <MoinMoin.user.User instance>, self._load_from_auth_data = <bound method User._load_from_auth_data of <MoinMoin.user.User instance>>, auth_data = None

 /usr/lib/python2.4/site-packages/MoinMoin/user.py in _load_from_auth_data(self=<MoinMoin.user.User instance>, auth_data=None)
  434 try:
  435 key, val = line.strip().split('=', 1)
  436 if key not in self._transient_fields and key[0] != '_':
  437 # Decode list values
  438 if key in ['quicklinks', 'subscribed_pages']:
key = u'', self = <MoinMoin.user.User instance>, self._transient_fields = ['id', 'valid', 'may', 'auth_username', 'trusted', 'email', 'name', 'authserver']

IndexError: string index out of range
      __doc__ = 'Sequence index out of range.'
      __getitem__ = <bound method IndexError.__getitem__ of <exceptions.IndexError instance>>
      __init__ = <bound method IndexError.__init__ of <exceptions.IndexError instance>>
      __module__ = 'exceptions'
      __str__ = <bound method IndexError.__str__ of <exceptions.IndexError instance>>
      args = ('string index out of range',)

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

Yup, here too after editing the CommunityCouncilAgenda page. Page was saved bot this error was shown.

Revision history for this message
Matthew East (mdke) wrote :

Confirming then. Others have also reported this issue.

Changed in ubuntu-website:
importance: Untriaged → High
status: Unconfirmed → Confirmed
Revision history for this message
Matthew East (mdke) wrote :

Nick: any idea about this error? a few users have reported it since the wiki was brought back up this morning.

Revision history for this message
Nick Moffitt (nick-moffitt) wrote :

It appears to be happening somewhere in the user auth code. I'll look into it; but just for completeness, has anything changed on the LP side?

Revision history for this message
Matthew Nuzum (newz) wrote :

ok, kiko and I found the problem and fixed it. However a permanant solution needs to be implemented.

The short-term solution was to remove the line in user/77583 that matched '^=.*$'. The line simply had =0 on it. Apparently Moin scans every user file when you save a page. (maybe to look for subscribers for a page?)

A good fix would be to modify line 436 of MoinMoin/user.py so that instead of just:
if key not in self._transient_fields and key[0] != '_':
It also did a check to ensure key isn't empty. For example,
if key and key not in self._transient_fields and key[0] != '_':

Revision history for this message
Andrew Bennetts (spiv) wrote :

Nick: No, no change from the LP side.

Matthew: yes, Moin does scan every single user file to look for subscribers for a page (at least it no longer hits LP for every user when it does this!).

I wonder how the broken key got in that file, but regardless, that fix sounds like a good idea to me.

Revision history for this message
Matthew East (mdke) wrote :

Did this fix get applied?

Changed in ubuntu-website:
importance: High → Medium
Revision history for this message
Matthew East (mdke) wrote :

Haven't seen any further complaints about this, so I'm assuming it has been fixed. Closing for now.

Changed in ubuntu-website:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.