isawnyu / pleiades-gazetteer

This repository provides a home for tickets and other planning documents for the Pleiades gazetteer of ancient places. Code is kept in multiple other repositories.
https://pleiades.stoa.org
11 stars 0 forks source link

unhashable type error in some connections listings #328

Closed paregorios closed 6 years ago

paregorios commented 6 years ago

After promoting an existing location to a place (https://pleiades.stoa.org/places/828476962).

Likely a boundary condition in code added recently for connection representation in place views.

Traceback (innermost last):

    Module ZPublisher.Publish, line 138, in publish
    Module ZPublisher.mapply, line 77, in mapply
    Module ZPublisher.Publish, line 48, in call_object
    Module Shared.DC.Scripts.Bindings, line 322, in __call__
    Module Shared.DC.Scripts.Bindings, line 359, in _bindAndExec
    Module Products.CMFCore.FSPageTemplate, line 237, in _exec
    Module Products.CMFCore.FSPageTemplate, line 177, in pt_render
    Module Products.PageTemplates.PageTemplate, line 87, in pt_render
    Module zope.pagetemplate.pagetemplate, line 132, in pt_render
    Warning: Macro expansion failed
    Warning: <type 'exceptions.KeyError'>: 'macro'
    Module zope.pagetemplate.pagetemplate, line 240, in __call__
    Module collective.newrelic.patches.talinterpreter, line 17, in monkeypatch
    Module newrelic.api.function_trace, line 110, in literal_wrapper
    Module zope.tal.talinterpreter, line 271, in __call__
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 954, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 946, in do_defineSlot
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 858, in do_defineMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 888, in do_useMacro
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    Module zope.tal.talinterpreter, line 518, in do_optTag
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 852, in do_condition
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 531, in do_optTag_tal
    Module zope.tal.talinterpreter, line 513, in no_tag
    Module zope.tal.talinterpreter, line 343, in interpret
    Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
    Module Products.PageTemplates.Expressions, line 218, in evaluateStructure
    Module zope.tales.tales, line 696, in evaluate
    URL: file:/srv/python27-apps/pleiades4/src/Products.PleiadesEntity/Products/PleiadesEntity/skins/PleiadesEntity/place_view.pt
    Line 185, Column 12
    Expression: <PathExpr standard:u'context/@@connections-listing|nothing'>
    Names:

    {'container': <Place at /plone/places/828476962>,
     'context': <Place at /plone/places/828476962>,
     'default': <object object at 0x7f98c22aabc0>,
     'here': <Place at /plone/places/828476962>,
     'loop': {},
     'nothing': None,
     'options': {'args': ()},
     'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x7f986a5ea470>,
     'request': <HTTPRequest, URL=https://pleiades.stoa.org/places/828476962/base_view>,
     'root': <Application at >,
     'template': <FSPageTemplate at /plone/places/828476962/base_view>,
     'traverse_subpath': [],
     'user': <PloneUser 'thomase'>}

    Module zope.tales.expressions, line 217, in __call__
    Module Products.PageTemplates.Expressions, line 155, in _eval
    Module Products.PageTemplates.Expressions, line 117, in render
    Module Products.PleiadesEntity.browser.attestations, line 125, in __call__
    Module Products.PleiadesEntity.browser.attestations, line 399, in rows
    Module Products.PleiadesEntity.browser.attestations, line 350, in prefix

TypeError: unhashable type: 'list' 
paregorios commented 6 years ago

Verified this is not symptom of a place without connections (e.g., https://pleiades.stoa.org/places/285857973)

paregorios commented 6 years ago

This doesn't just occur in cases of place promotion. It can be seen in the wild on production, e.g., https://pleiades.stoa.org/places/89175

paregorios commented 6 years ago

Fix deployed 2018-01-10 and verified on production.