You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
reopened: #111 Result for semantic search with query "[[HasLabel::BMD_StandardCU_V3]]" delivers random results, but more general #145
Issue persists, when querying via semantic_search(), correct osw_id is either returned or not (empty return).
Reproduced for "Item:OSWb5cbec50fb7c4c65b2082a20c6c32fb8", with "HasLabel::BMD_StandardCU_HealthBatt" and "[[HasUuid::b5cbec50-fb7c-4c65-b208-2a20c6c32fb8]]".
semantic_search called .values() on that payload unconditionally (https://github.com/OpenSemanticLab/osw-python/blob/main/src/osw/wiki_tools.py#L257), so every zero-result query raised AttributeError: 'list' object has no attribute 'values' instead of returning []. Single queries, sequential batches and parallel batches are all affected, as is OSW.query_instances(), which raised for any category with no instances.
return_json=True was unaffected because it returns before that line, which is why the failure looked intermittent depending on how the query was issued.
2. The two identifiers in the report do not refer to the same page
Independently of the crash, on the current instance:
Item:OSWb5cbec50fb7c4c65b2082a20c6c32fb8does not exist
[[HasLabel::BMD_StandardCU_HealthBatt]] returns exactly one page, Item:OSW0c0600667f8d4fe4a1c919fb8d070c94, stably across 15 consecutive calls
So [[HasUuid::b5cbec50-...]] legitimately matches nothing, and before the fix that empty match set is exactly what crashed. Worth double-checking whether the expected page was deleted or re-created under a new UUID.
3. The "random" part is a separate, server-side problem
See the analysis in #111 - the exists flag flickers between '1' and '' for pages that do exist, and the library's exists == "1" filter silently drops them. That one is not fixable in osw-python; PR #150 only adds a warning so the loss is visible.
Activity
LukasGold commentedon Aug 31, 2026
Reproduced and root-caused against
healthbatt.projects01.open-semantic-lab.org. There are two independent things here.1. The empty return is a crash, fixed in #150
SMW's
action=askserialises a non-empty result set as a JSON object keyed by page title, but an empty one as a JSON array:semantic_searchcalled.values()on that payload unconditionally (https://github.com/OpenSemanticLab/osw-python/blob/main/src/osw/wiki_tools.py#L257), so every zero-result query raisedAttributeError: 'list' object has no attribute 'values'instead of returning[]. Single queries, sequential batches and parallel batches are all affected, as isOSW.query_instances(), which raised for any category with no instances.return_json=Truewas unaffected because it returns before that line, which is why the failure looked intermittent depending on how the query was issued.2. The two identifiers in the report do not refer to the same page
Independently of the crash, on the current instance:
Item:OSWb5cbec50fb7c4c65b2082a20c6c32fb8does not exist[[HasLabel::BMD_StandardCU_HealthBatt]]returns exactly one page,Item:OSW0c0600667f8d4fe4a1c919fb8d070c94, stably across 15 consecutive callsSo
[[HasUuid::b5cbec50-...]]legitimately matches nothing, and before the fix that empty match set is exactly what crashed. Worth double-checking whether the expected page was deleted or re-created under a new UUID.3. The "random" part is a separate, server-side problem
See the analysis in #111 - the
existsflag flickers between'1'and''for pages that do exist, and the library'sexists == "1"filter silently drops them. That one is not fixable in osw-python; PR #150 only adds a warning so the loss is visible.LukasGold commentedon Sep 2, 2026
@SimonStier Handling this issue surfaced a sever server-side problem, see above