hplt-project / OpusCleaner

OpusCleaner is a web interface that helps you select, clean and schedule your data for training machine translation models.

Home Page:https://pypi.org/project/opuscleaner/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpusCleaner get stuck on ASGI error when adding filters while sample is still loading

jelmervdl opened this issue · comments

commented

Found on Paracrawl zh-en by Nick.

After all these months, I finally figured it out!

Changed in version 3.8: CancelledError is now a subclass of BaseException rather than Exception.

The sampling process got cancelled, but it didn't get removed from the sample cache. So now you're basically always awaiting a cancelled future, which throws a CancelledError that isn't caught by any of my normal except clauses because they're written as except Exception as err:, which, for the attentive listeners out there, is not a base class of CancelledError.