Gaps in Matomo Event Tracking

Hi there.
We are using Matomo to track the visitors of our application.
For this, we have defined some events and wrote a python script to export the log files every night.
But we have always some gaps, i.e. some days cannot be exported despite our python script seems to work perfectly well.
Any idea what causes this?
Best regards