File "piSchedule.py", line 51, in <module>
from apscheduler.scheduler import Scheduler
ImportError: No module named scheduler
$ sudo easy_install apscheduler
Searching for apscheduler
Reading http://pypi.python.org/simple/apscheduler/
Best match: APScheduler 3.0.0
..etc ..
Installed /usr/local/lib/python2.7/dist-packages/six-1.8.0-py2.7.egg
Finished processing dependencies for apscheduler
$
$ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
After (re)installing Raspberry/Weezy on a brand new SD-card I need to run a python script
with APScheduler.
The script fails with
File "piSchedule.py", line 51, in <module>
from apscheduler.scheduler import Scheduler
ImportError: No module named scheduler
Line #51 has:
from apscheduler.scheduler import Scheduler
The same python script runs without problem based on previous install, so it's unclear for me why it's failing.
Details about the installation:
$ sudo easy_install apscheduler
Searching for apscheduler
Reading http://pypi.python.org/simple/apscheduler/
Best match: APScheduler 3.0.0
..etc ..
Installed /usr/local/lib/python2.7/dist-packages/six-1.8.0-py2.7.egg
Finished processing dependencies for apscheduler
$
Python is
$ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Any help?
--
You received this message because you are subscribed to the Google Groups "APScheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apscheduler...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
...
It seems like your code was made for APScheduler 2.x. Then you installed APScheduler 3.0. APIs sometimes change with major releases, and this happened in the 3.0 release too. That is why your code failed. So either install an earlier version or (preferably) update your code for the 3.0 API. There are helpful instructions for that in the documentation.
...
#from apscheduler.scheduler import Scheduler
from apscheduler.schedulers.background import BackgroundScheduler
AttributeError: 'BackgroundScheduler' object has no attribute 'add_date_job'... and -- sorry -- where is a description how to migrate 'add_date_job'
Maybe you have time to give some more descriptive migration help on your docs.
Thanks
File "piSchedule.py", line 239, in pilightSchedule
jobs.append(sched.add_job(fire_pilight, str(xTime), [message + "|" + info], name=jobName))
File "/usr/local/lib/python2.7/dist-packages/APScheduler-3.0.0-py2.7.egg/apscheduler/schedulers/base.py", line 330, in add_job
'trigger': self._create_trigger(trigger, trigger_args),
File "/usr/local/lib/python2.7/dist-packages/APScheduler-3.0.0-py2.7.egg/apscheduler/schedulers/base.py", line 782, in _create_trigger
return self._create_plugin_instance('trigger', trigger, trigger_args)
File "/usr/local/lib/python2.7/dist-packages/APScheduler-3.0.0-py2.7.egg/apscheduler/schedulers/base.py", line 766, in _create_plugin_instance
raise LookupError('No {0} by the name "{1}" was found'.format(type_, alias))
LookupError: No trigger by the name "2014-09-17 22:50:00" was found