ductor icon indicating copy to clipboard operation
ductor copied to clipboard

SyntaxError in cron_sanitize.py (v0.15.0 PyPI) — unquoted type:error

Open miguelbenajes opened this issue 7 months ago • 2 comments

Bug

The PyPI release of ductor 0.15.0 includes a SyntaxError in ductor_bot/bus/cron_sanitize.py that prevents the bot from starting.

Details

Line 15 has an unquoted type:error in the _TRANSIENT_ERROR_MARKERS tuple:

_TRANSIENT_ERROR_MARKERS = (
    "overloaded_error",
    "overloaded",
    type:error,          # ← missing quotes
    "api error: 529",
    "api error: 503",
    "api error: 502",
)

Should be "type:error".

Impact

Crashes the bot on startup — cron_sanitize is imported in the Telegram transport startup path. Service enters crash-loop.

Traceback

File "ductor_bot/messenger/telegram/transport.py", line 15
    from ductor_bot.bus.cron_sanitize import sanitize_cron_result_text
File "ductor_bot/bus/cron_sanitize.py", line 15
    type:error,
        ^
SyntaxError: invalid syntax

Notes

  • GitHub source at v0.15.0 tag has a shorter version without _TRANSIENT_ERROR_MARKERS, so the bug only exists in the PyPI package.
  • Workaround: manually quote "type:error" in the installed file.

miguelbenajes avatar Apr 08 '26 09:04 miguelbenajes

Fixed via re-release in v0.16.0. The problematic line was already reverted on main back then, but the published PyPI wheel captured the broken intermediate state. v0.16.0 is a clean re-release that includes the fix plus a full feature payload accumulated since. pip install --upgrade ductor (or pipx upgrade ductor) clears the SyntaxError crash-loop. Apologies for leaving you stuck on v0.15.0 — as part of this release I also tightened the publish pipeline so a broken wheel can't reach PyPI again silently.

PleasePrompto avatar Apr 21 '26 10:04 PleasePrompto

Fixed in v0.16.0 (re-release).

The fix was already on main (the problematic line was reverted before v0.15.0 shipped), but the published PyPI wheel captured the broken intermediate state. v0.16.0 is a clean re-release that includes the fix plus a full feature payload that accumulated since then. pip install --upgrade ductor (or pipx upgrade ductor) clears the SyntaxError crash-loop. Apologies for leaving you stuck on v0.15.0 — as part of this work I also tightened the release process so a broken wheel can't reach PyPI again silently.

PleasePrompto avatar Apr 21 '26 10:04 PleasePrompto