Skip to content

v0.6.1 - Fix cp1252 UnicodeEncodeError (emoji in YouTube titles)

Latest

Choose a tag to compare

@AntonioBlago AntonioBlago released this 30 Jun 15:48

Bug fix

learn_youtube crashed on Windows consoles using the legacy cp1252 code page when a video title contained an emoji (e.g. a leading 🧠):

'charmap' codec can't encode character '\U0001f9e0' in position 33

Fix

  • New skillmind.ioutil.force_utf8_io() reconfigures stdout/stderr to UTF-8 with errors=replace (idempotent, guarded for streams without reconfigure).
  • Called at every process entry point: MCP server main(), CLI group, and YouTubeLearner.learn() / learn_channel().

Tests

  • tests/test_ioutil.py and a cp1252 regression test in tests/test_youtube_progress.py (cp1252 stream double that rejects non-cp1252 glyphs until reconfigured).

PyPI: https://pypi.org/project/skillmind/0.6.1/