Changelog - Version 5.7.8 (2026-05-21)
Version Information
- Updated version from 5.7.7 to 5.7.8
- Fix for the Stable bot: weather data from the WebSocket is now parsed reliably and no longer breaks on location names containing apostrophes
Bug Fixes
- Fixed
WEATHER_DATApayload parsing failing on apostrophes in location names- The bot’s
process_weather_websockethandler was usingast.literal_evalto parse theweather_datapayload because the API had previously sent the data as a stringified Python dictionary (single-quoted, with mixed quoting on apostrophes). - Any payload containing a location like
Saint John's,Coeur d'Alene, orO'Brienproduced malformed quoting on the wire and crashed the parser, so the weather notice never made it to chat. - The bot now tries
json.loadsfirst and only falls back toast.literal_evalfor legacy payloads. New payloads from the API are clean JSON, so the apostrophe class of failures is gone.
- The bot’s
Technical Details
- Root cause was that the WebSocket weather event was being constructed by passing a Python dict through
urlencode, which callsstr()on the dict and produces Python-literal syntax instead of JSON. The dual quoting around apostrophes ("Saint John's"vs'Saint John\'s') varied based on the field contents, making any single-quote-replacement-then-json.loadsstrategy unreliable. - Fixes implemented:
- Added a tolerant parser to
process_weather_websocket(): attemptsjson.loads(raw)first, and only falls back toast.literal_eval(raw)if the JSON parse fails. Errors from both paths are logged viaevent_logger.errorrather than crashing the handler. - The API was updated in the same release to send
json.dumps(formatted_weather_data)so new payloads no longer require any fallback.
- Added a tolerant parser to
Thank you for your feedback and support!
As always, your feedback is appreciated. Please report any issues, bugs, or suggestions in the #ticket-info channel on our Discord server. You can also submit feedback and bug reports directly on our support website: https://support.botofthespecter.com/