<type 'exceptions.AttributeError'>: 'DirectoryAsHTML' object has no attribute 'dirnode_children_error'
"""
try:
next = iterable.next()
except StopIteration:
iterable | <generator object at 0x9737e6c> |
while rest:
gen = rest.pop()
for item in gen:
if isinstance(item, str):
rest | [<listiterator object at 0x97379ac>, <generator object at 0x9737aec>] |
item | <generator object at 0x9737fcc> |
gen | <generator object at 0x9737fcc> |
# the specials won't be on the context twice.
original._clearSpecials()
yield serialize(toBeRenderedBy, context)
return
toBeRenderedBy | directive('try_children') |
original | Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n']) |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
serialize | <function serialize at 0x8b57c34> |
def serialize(obj, context):
#warnings.warn('serialize is deprecated; it has been renamed partialflatten.', stacklevel=2)
return partialflatten(context, obj)
obj | directive('try_children') |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
serialize | <function serialize at 0x8b57c34> |
partialflatten | <function partialflatten at 0x8b57bfc> |
warnings | <module 'warnings' from '/usr/lib/python2.5/warnings.pyc'> |
flattener = getFlattener(obj)
if flattener is not None:
return flattener(obj, context)
flattener | <function DirectiveSerializer at 0x8e6bbc4> |
obj | directive('try_children') |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
getFlattener | <function getFlattener at 0x8b57b8c> |
rendererFactory = context.locate(IRendererFactory)
renderer = rendererFactory.renderer(context, original.name)
return serialize(renderer, context)
rendererFactory | <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc> |
renderer | <bound method DirectoryAsHTML.render_try_children of <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc>> |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
original | directive('try_children') |
serialize | <function serialize at 0x8b57c34> |
IRendererFactory | <InterfaceClass nevow.inevow.IRendererFactory> |
def serialize(obj, context):
#warnings.warn('serialize is deprecated; it has been renamed partialflatten.', stacklevel=2)
return partialflatten(context, obj)
obj | <bound method DirectoryAsHTML.render_try_children of <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc>> |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
serialize | <function serialize at 0x8b57c34> |
partialflatten | <function partialflatten at 0x8b57bfc> |
warnings | <module 'warnings' from '/usr/lib/python2.5/warnings.pyc'> |
flattener = getFlattener(obj)
if flattener is not None:
return flattener(obj, context)
flattener | <function MethodSerializer at 0x8e6bb54> |
obj | <bound method DirectoryAsHTML.render_try_children of <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc>> |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
getFlattener | <function getFlattener at 0x8b57b8c> |
code = getattr(func, 'func_code', None)
return code is None or code.co_argcount == 2
return FunctionSerializer(original, context, nocontext)
nocontext | <function nocontext at 0x990ee9c> |
original | <bound method DirectoryAsHTML.render_try_children of <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc>> |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
FunctionSerializer | <function FunctionSerializer at 0x8e6bb1c> |
result = original(renderer, context, data)
else:
result = original(context, data)
except StopIteration:
data | None |
context | WovenContext(tag=Tag(u'div', children=['\n', WovenContext(tag=Tag(u'table', attributes={u'border': u'1'}, specials={'data': directive('children'), 'render': directive('sequence')}, children=['\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'header'}, children=['\n <td>Filename</td>\n <td>Type</td>\n <td>Size</td>\n <td>Times</td>\n <td></td>\n <td></td>\n <td></td>\n '])), '\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'item', 'render': directive('row')}, children=['\n <td>', _PrecompiledSlot(u'filename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'type', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'size', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'times', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'delete', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'rename', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n <td>', _PrecompiledSlot(u'info', isAttrib=False, inURL=False, inJS=False, inJSSingleQuoteString=False), '</td>\n '])), '\n\n ', WovenContext(tag=Tag(u'tr', specials={u'pattern': u'empty'}, children=['<td>directory is empty!</td>'])), '\n\n'])), '\n'])) |
original | <bound method DirectoryAsHTML.render_try_children of <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc>> |
else:
return T.div[T.p["Error reading directory:"],
T.p[self.dirnode_children_error]]
self | <allmydata.web.directory.DirectoryAsHTML object at 0x97222cc> |
T | <module 'nevow.tags' from '/usr/lib/python2.5/site-packages/nevow/tags.pyc'> |
<type 'exceptions.AttributeError'>: 'DirectoryAsHTML' object has no attribute 'dirnode_children_error'