@meeera Your code is probably very clean
This is probably caused by a minor code error in one of the files.
FWIW Very rarely (1 time every couple of months. been happening for a couple of years), I send an EPUB as KEPUB and the file is corrupt when I go to read it on my Kobo. I must delete the book then resend . Using the Validate in the Editor, does not see any issues.
(Win X64 Calibre)