mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 22:29:25 +08:00
Mimic mode wrote the uploaded paper into a NamedTemporaryFile with delete=True and handed its name to the parse service while the handle was still open. The parse service reopens the file by path to hash it for the parse cache, and on Windows a file held with delete-on-close cannot be reopened, so every uploaded paper failed with PermissionError before any engine ran. The error is not a MinerUError, so it escaped the capability's handler. Write the paper into a TemporaryDirectory and close it before parsing. The directory is removed afterwards, as the temporary file was.