kugetsu queue list fails with JSON decode error #155

Closed
opened 2026-04-05 15:37:39 +02:00 by shoko · 0 comments
Owner

Problem

kugetsu queue list fails with JSON decode error when queue has items:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import sys, json; [print(f"  {t.get('id')}: {t.get('issue_ref')} - {t.get('message', '')[:50]}...") for t in json.load(sys.stdin)]
  File "/usr/lib64/python3.14/json/decoder.py", line 352, in loads
    return _default_decoder.decode(s)
json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1)

Root Cause

get_pending_tasks() outputs concatenated JSON objects (one per line), then json.load() expects a single JSON value.

Fix

Rewrite get_pending_tasks() to use Python directly to collect pending items and return a proper JSON array. No shell pipeline concatenation.

## Problem `kugetsu queue list` fails with JSON decode error when queue has items: ``` Traceback (most recent call last): File "<string>", line 1, in <module> import sys, json; [print(f" {t.get('id')}: {t.get('issue_ref')} - {t.get('message', '')[:50]}...") for t in json.load(sys.stdin)] File "/usr/lib64/python3.14/json/decoder.py", line 352, in loads return _default_decoder.decode(s) json.decoder.JSONDecodeError: Expecting value: line 2 column 1 (char 1) ``` ## Root Cause `get_pending_tasks()` outputs concatenated JSON objects (one per line), then `json.load()` expects a single JSON value. ## Fix Rewrite `get_pending_tasks()` to use Python directly to collect pending items and return a proper JSON array. No shell pipeline concatenation.
shoko closed this issue 2026-04-06 01:45:10 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/kugetsu#155