APScheduler - ImportWarning but code still runs. What is wrong?
<p>My code follows the example from <a href="http://apscheduler.readthedocs.io/en/latest/modules/triggers/interval.html#examples" rel="nofollow">APScheduler Docs</a> but I changed its format  to follow mine. It works no problem. "Hello World" is printed every 10 seconds.</p>

<pre><code>#! /usr/bin/python

import datetime

from apscheduler.schedulers.blocking import BlockingScheduler

class Class1:

    def job_function():
        print("Hello World")

class Class2:        

    def go():

        sched = BlockingScheduler()

        # Schedule job_function to be called every 10 seconds
        sched.add_job(Classy.job_function, 'interval', seconds = 10)

        sched.start()

if __name__ == '__main__':

    Class2.go()
</code></pre>

<p>My actual code however, does not work so well. </p>

<pre><code>#! /usr/bin/python

import time
import praw
import OAuth2Util
import redditNewsBot
import redditFreeGameBot
import redditWorldNewsBot
from datetime import datetime
from apscheduler.schedulers.blocking import BlockingScheduler


class Aggregate:

    def aggr()
        ...

    def x():
        print('x')

class RunSchedule:

    def go():

        sched = BlockingScheduler()

        # Schedule job_function to be called every ten seconds
        sched.add_job(Aggregate.x, 'interval', seconds = 10)

        sched.start()


if __name__ == '__main__':

    RunSchedule.go()
</code></pre>

<p>Everything will run at the specified interval but I get all this first:</p>

<pre><code>C:\Users\Nick\AppData\Local\Programs\Python\Python35-32\lib\importlib\_bootstrap_external.py:415: ImportWarning: Not importing directory

C:\Users\Nick\AppData\Local\Programs\Python\Python35-32\lib\site-packages\mpl_toolkits: missing __init___warnings.warn(msg.format(portions[0]), ImportWarning)

C:\Users\Nick\AppData\Local\Programs\Python\Python35-32\lib\importlib\_bootstrap_external.py:415: ImportWarning: Not importing directory 

c:\users\nick\appdata\local\programs\python\python35-32\lib\site-packages\mpl_toolkits: missing __init___warnings.warn(msg.format(portions[0]), ImportWarning)

C:\Users\Nick\AppData\Local\Programs\Python\Python35-32\lib\importlib\_bootstrap_external.py:415: ImportWarning: Not importing directory 

C:\Users\Nick\AppData\Local\Programs\Python\Python35-32\lib\site-packages\zope: missing __init___warnings.warn(msg.format(portions[0]), ImportWarning)
</code></pre>

<p>It was <code>praw</code>.</p>

<p>I imported it to the test script behind <code>datetime</code> and <code>from apscheduler.schedulers.blocking import BlockingScheduler</code> and it ran error free. </p>

<p>I then moved it in front of the latter and it threw the errors.</p>

<p>In order to run error free from <code>apscheduler.schedulers.blocking import BlockingSchedulerhad</code> to move to the very front of the import list. <code>time</code> and <code>datetime</code> can be in front without errors as well.</p>

<pre><code>from apscheduler.schedulers.blocking import BlockingScheduler
import praw
import time
import datetime
import OAuth2Util
import redditNewsBot
import redditFreeGameBot
import redditWorldNewsBot
</code></pre>

python apscheduler