Skip to content

Instantly share code, notes, and snippets.

@fidothe
Created July 14, 2009 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fidothe/147024 to your computer and use it in GitHub Desktop.
Save fidothe/147024 to your computer and use it in GitHub Desktop.
<!--: spam
Content-Type: text/html
<body><font style="color: white; font-size: 1px"> -->
<body><font style="color: white; font-size: 1px"> --> -->
</font> </font> </font> </script> </object> </blockquote> </pre>
</table> </table> </table> </table> </table> </font> </font> </font>
<div class="cgitb">
<script type="text/javascript">
function toggleDebugInfo() {
var tb = document.getElementById('debug-info');
if (tb == null) return;
tb.style.display = tb.style.display ? '' : 'none';
}
</script>
<style type="text/css">
.cgitb {background: #E6EAF0; border: 1px solid #4D6180; direction: ltr;}
.cgitb p {margin: 0.5em 0; padding: 5px 10px; text-align: left;}
.cgitb ol {margin: 0}
.cgitb li {margin: 0.25em 0;}
.cgitb h1, .cgitb h2, .cgitb h3 {padding: 5px 10px; margin: 0; background: #4D6180; color: white;}
.cgitb h1 {font-size: 1.3em;}
.cgitb h2 {font-size: 1em; margin-top: 1em;}
.cgitb h3 {font-size: 1em;}
.cgitb .frames {margin: 0; padding: 0; color: #606060}
.cgitb .frames li {display: block;}
.cgitb .call {padding: 5px 10px; background: #A3B4CC; color: black}
.cgitb .context {padding: 0; font-family: monospace; }
.cgitb .context li {display: block; white-space: pre;}
.cgitb .context li.highlight {background: #C0D3F0; color: black}
.cgitb .variables {padding: 5px 10px; font-family: monospace;}
.cgitb .variables li {display: inline;}
.cgitb .variables li:after {content: ", ";}
.cgitb .variables li:last-child:after {content: "";}
.cgitb .exception {border: 1px solid #4D6180; margin: 10px}
.cgitb .exception h3 {background: #4D6180; color: white;}
.cgitb .exception p {color: black;}
.cgitb .exception ul {padding: 0 10px; font-family: monospace;}
.cgitb .exception li {display: block;}
.cgitb .buttons {margin: 0.5em 0; padding: 5px 10px;}
.cgitb .buttons li {display: inline; margin: 0; padding: 0 0.25em;}
</style><h1>IndexError</h1>
<p>string index out of range</p>
<p>If you want to report a bug, please save this page and attach it to your bug report.</p>
<ul class="buttons">
<li><a href="javascript:toggleDebugInfo()">Show debugging information</a>
</li>
<li><a href="http://moinmo.in/MoinMoinBugs">Report bug</a>
</li>
<li><a href="http://moinmo.in/FrontPage">Visit MoinMoin wiki</a>
</li>
</ul>
<div id="debug-info">
<script type="text/javascript">toggleDebugInfo()</script>
<div class="traceback"><h2>Traceback</h2>
<p>A problem occurred in a Python script. Here is the
sequence of function calls leading up to the error, in the
order they occurred.</p>
<ol class="frames">
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py</a>
in <strong>run</strong>
(self=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;)</p>
<ol class="context">
<li> 1306 self.page.send_page()
</li>
<li> 1307 else:
</li>
<li class="highlight"> 1308 handler(self.page.page_name, self)
</li>
<li> 1309
</li>
<li> 1310 # every action that didn't use to raise MoinMoinFinish must call this now:
</li>
</ol>
<ul class="variables">
<li><strong>handler</strong>
= &lt;function do_show at 0xdf61b8&gt;</li>
<li><strong>self</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li>self.<strong>page</strong>
= &lt;MoinMoin.Page.Page object at 0x2e6bcd0&gt;</li>
<li>self.page.<strong>page_name</strong>
= u'FrontPage'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/action/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/action/__init__.py</a>
in <strong>do_show</strong>
(pagename=u'FrontPage', request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, content_only=0, count_hit=1, cacheable=1, print_mode=0)</p>
<ol class="context">
<li> 241 """
</li>
<li> 242 # We must check if the current page has different ACLs.
</li>
<li class="highlight"> 243 if not request.user.may.read(pagename):
</li>
<li> 244 Page(request, pagename).send_page()
</li>
<li> 245 else:
</li>
</ol>
<ul class="variables">
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li>request.<strong>user</strong>
= &lt;MoinMoin.user.User at 0x2b1d680 name:u'MattP' valid:1&gt;</li>
<li>request.user.<strong>may</strong>
= &lt;MoinMoin.security.Permissions instance at 0x2b1d3f8&gt;</li>
<li>request.user.may.<strong>read</strong>
= &lt;function &lt;lambda&gt; at 0x2e8cd70&gt;</li>
<li><strong>pagename</strong>
= u'FrontPage'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py</a>
in <strong><lambda></strong>
(pagename=u'FrontPage')</p>
<ol class="context">
<li> 144 if attr not in request.cfg.acl_rights_valid:
</li>
<li> 145 raise AttributeError, attr
</li>
<li class="highlight"> 146 return lambda pagename: _check(self.request, pagename, self.name, attr)
</li>
<li> 147
</li>
<li> 148
</li>
</ol>
<ul class="variables">
<li><strong>pagename</strong>
= u'FrontPage'</li>
<li><em>global</em>
<strong>_check</strong>
= &lt;function _check at 0xd00ed8&gt;</li>
<li><strong>self</strong>
= &lt;MoinMoin.security.Permissions instance at 0x2b1d3f8&gt;</li>
<li>self.<strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li>self.<strong>name</strong>
= u'MattP'</li>
<li><strong>attr</strong>
= 'read'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py</a>
in <strong>_check</strong>
(request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, pagename=u'FrontPage', username=u'MattP', right='read')</p>
<ol class="context">
<li> 80 p = Page(request, pagename)
</li>
<li> 81 acl = p.getACL(request) # this will be fast in a reused page obj
</li>
<li class="highlight"> 82 allowed = acl.may(request, username, right)
</li>
<li> 83 if allowed is not None:
</li>
<li> 84 return allowed
</li>
</ol>
<ul class="variables">
<li><strong>allowed</strong>
= None</li>
<li><strong>acl</strong>
= &lt;MoinMoin.security.AccessControlList instance at 0xef2518&gt;</li>
<li>acl.<strong>may</strong>
= &lt;bound method AccessControlList.may of &lt;MoinMoin.security.AccessControlList instance at 0xef2518&gt;&gt;</li>
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li><strong>username</strong>
= u'MattP'</li>
<li><strong>right</strong>
= 'read'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py</a>
in <strong>may</strong>
(self=&lt;MoinMoin.security.AccessControlList instance at 0xef2518&gt;, request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, name=u'MattP', dowhat='read')</p>
<ol class="context">
<li> 314 if entry in self.special_users:
</li>
<li> 315 handler = getattr(self, "_special_"+entry, None)
</li>
<li class="highlight"> 316 allowed = handler(request, name, dowhat, rightsdict)
</li>
<li> 317 elif group_re.search(entry):
</li>
<li> 318 if is_group_member(entry, name):
</li>
</ol>
<ul class="variables">
<li><strong>allowed</strong>
= None</li>
<li><strong>handler</strong>
= &lt;bound method AccessControlList._special_Known o...security.AccessControlList instance at 0xef2518&gt;&gt;</li>
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li><strong>name</strong>
= u'MattP'</li>
<li><strong>dowhat</strong>
= 'read'</li>
<li><strong>rightsdict</strong>
= {'admin': False, 'delete': False, 'read': True, 'revert': False, 'write': True}</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py">/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py</a>
in <strong>_special_Known</strong>
(self=&lt;MoinMoin.security.AccessControlList instance at 0xef2518&gt;, request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, name=u'MattP', dowhat='read', rightsdict={'admin': False, 'delete': False, 'read': True, 'revert': False, 'write': True})</p>
<ol class="context">
<li> 346 works for subscription emails.
</li>
<li> 347 """
</li>
<li class="highlight"> 348 if user.getUserId(request, name): # is a user with this name known?
</li>
<li> 349 return rightsdict.get(dowhat)
</li>
<li> 350 return None
</li>
</ol>
<ul class="variables">
<li><em>global</em>
<strong>user</strong>
= &lt;module 'MoinMoin.user' from '/usr/lib/python2.5/site-packages/MoinMoin/user.pyc'&gt;</li>
<li>user.<strong>getUserId</strong>
= &lt;function getUserId at 0xd60b90&gt;</li>
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li><strong>name</strong>
= u'MattP'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/user.py">/usr/lib/python2.5/site-packages/MoinMoin/user.py</a>
in <strong>getUserId</strong>
(request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, searchName=u'MattP')</p>
<ol class="context">
<li> 112 @return: the corresponding user ID or None
</li>
<li> 113 """
</li>
<li class="highlight"> 114 return _getUserIdByKey(request, 'name', searchName)
</li>
<li> 115
</li>
<li> 116
</li>
</ol>
<ul class="variables">
<li><em>global</em>
<strong>_getUserIdByKey</strong>
= &lt;function _getUserIdByKey at 0xd60b18&gt;</li>
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li><strong>searchName</strong>
= u'MattP'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/user.py">/usr/lib/python2.5/site-packages/MoinMoin/user.py</a>
in <strong>_getUserIdByKey</strong>
(request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, key='name', search=u'MattP')</p>
<ol class="context">
<li> 87 if uid is None:
</li>
<li> 88 for userid in getUserList(request):
</li>
<li class="highlight"> 89 u = User(request, id=userid)
</li>
<li> 90 if hasattr(u, key):
</li>
<li> 91 value = getattr(u, key)
</li>
</ol>
<ul class="variables">
<li><strong>u</strong>
= &lt;MoinMoin.user.User at 0x2b1d488 name:u'IldarY' valid:1&gt;</li>
<li><em>global</em>
<strong>User</strong>
= &lt;class MoinMoin.user.User at 0xd596b0&gt;</li>
<li><strong>request</strong>
= &lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;</li>
<li><em>builtin</em>
<strong>id</strong>
= &lt;HIDDEN&gt;</li>
<li><strong>userid</strong>
= '1.552476'</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/user.py">/usr/lib/python2.5/site-packages/MoinMoin/user.py</a>
in <strong>__init__</strong>
(self=&lt;MoinMoin.user.User at 0x2957fc8 name:'' valid:0&gt;, request=&lt;MoinMoin.request.request_standalone.Request object at 0x2e6bed0&gt;, id='1.552476', name='', password=None, auth_username='', **kw={})</p>
<ol class="context">
<li> 350 check_pass = 1
</li>
<li> 351 if self.id:
</li>
<li class="highlight"> 352 self.load_from_id(check_pass)
</li>
<li> 353 elif self.name:
</li>
<li> 354 self.id = getUserId(self._request, self.name)
</li>
</ol>
<ul class="variables">
<li><strong>self</strong>
= &lt;MoinMoin.user.User at 0x2957fc8 name:'' valid:0&gt;</li>
<li>self.<strong>load_from_id</strong>
= &lt;bound method User.load_from_id of &lt;MoinMoin.user.User at 0x2957fc8 name:'' valid:0&gt;&gt;</li>
<li><strong>check_pass</strong>
= 0</li>
</ul>
</li>
<li><p class="call"><a href="file:///usr/lib/python2.5/site-packages/MoinMoin/user.py">/usr/lib/python2.5/site-packages/MoinMoin/user.py</a>
in <strong>load_from_id</strong>
(self=&lt;MoinMoin.user.User at 0x2957fc8 name:'' valid:0&gt;, check_pass=0)</p>
<ol class="context">
<li> 430 try:
</li>
<li> 431 key, val = line.strip().split('=', 1)
</li>
<li class="highlight"> 432 if key not in self._cfg.user_transient_fields and key[0] != '_':
</li>
<li> 433 # Decode list values
</li>
<li> 434 if key.endswith('[]'):
</li>
</ol>
<ul class="variables">
<li><strong>key</strong>
= &lt;HIDDEN&gt;</li>
<li><strong>self</strong>
= &lt;MoinMoin.user.User at 0x2957fc8 name:'' valid:0&gt;</li>
<li>self.<strong>_cfg</strong>
= &lt;wikiconfig.Config object at 0xd0c790&gt;</li>
<li>self._cfg.<strong>user_transient_fields</strong>
= ['id', 'valid', 'may', 'auth_username', 'password', 'password2', 'auth_method', 'auth_attribs']</li>
</ul>
</li>
</ol>
<div class="exception"><h3>IndexError</h3>
<p>string index out of range</p>
<ul>
<li>args = ('string index out of range',)</li>
<li>message = 'string index out of range'</li>
</ul>
</div>
</div>
<h2>System Details</h2>
<ul class="system">
<li>Date: Tue, 14 Jul 2009 15:49:20 +0000</li>
<li>Platform: Linux watermelon.getdropbox.com 2.6.24-23-generic #1 SMP Wed Apr 1 21:43:24 UTC 2009 x86_64</li>
<li>Python: Python 2.5.2 (/usr/bin/python)</li>
<li>MoinMoin: Release 1.7.3 (release)</li>
</ul>
</div>
<!-- The above is a description of an error in a Python program,
formatted for a Web browser. In case you are not reading this
in a Web browser, here is the original traceback:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/MoinMoin/request/__init__.py", line 1308, in run
handler(self.page.page_name, self)
File "/usr/lib/python2.5/site-packages/MoinMoin/action/__init__.py", line 243, in do_show
if not request.user.may.read(pagename):
File "/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py", line 146, in &lt;lambda&gt;
return lambda pagename: _check(self.request, pagename, self.name, attr)
File "/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py", line 82, in _check
allowed = acl.may(request, username, right)
File "/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py", line 316, in may
allowed = handler(request, name, dowhat, rightsdict)
File "/usr/lib/python2.5/site-packages/MoinMoin/security/__init__.py", line 348, in _special_Known
if user.getUserId(request, name): # is a user with this name known?
File "/usr/lib/python2.5/site-packages/MoinMoin/user.py", line 114, in getUserId
return _getUserIdByKey(request, 'name', searchName)
File "/usr/lib/python2.5/site-packages/MoinMoin/user.py", line 89, in _getUserIdByKey
u = User(request, id=userid)
File "/usr/lib/python2.5/site-packages/MoinMoin/user.py", line 352, in __init__
self.load_from_id(check_pass)
File "/usr/lib/python2.5/site-packages/MoinMoin/user.py", line 432, in load_from_id
if key not in self._cfg.user_transient_fields and key[0] != '_':
IndexError: string index out of range
-->
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment