Pyinstaller 3.3.1 & 3.4.0-dev build with apscheduler

The problem lies with the fact that pyinstaller does not package setuptools entry points which are required by APScheduler to look up the trigger classes. The workaround is to import and use the triggers manually.


Based on Alex Grönholm reply:

The issue was indeed because APScheduler using a setuptools entry points to look up the trigger classes.

Solution is to instantiate trigger and pass to add_job():

from apscheduler.schedulers.background import BackgroundScheduler
from apscheduler.triggers import interval

scheduler = BackgroundScheduler()

trigger = interval.IntervalTrigger(seconds=3)
scheduler.add_job(lambda: job_func(ws), trigger=trigger, id='status_update_job', replace_existing=True)