Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with apscheduler
#1
Gettinf the following error when running software for SwitchDoc's GroveWeatherPi:

Error:
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ sudo python GroveWeatherPi.py Traceback (most recent call last): File "GroveWeatherPi.py", line 55, in <module> from apscheduler.schedulers.background import BackgroundScheduler ImportError: No module named schedulers.background pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $
Below is the code from the software itself:

from apscheduler.schedulers.background import BackgroundScheduler

import apscheduler.events


# Check for user imports
try:
        import conflocal as config
except ImportError:
        import config

if (config.enable_MySQL_Logging == True):
        import MySQLdb as mdb
I have installed mysql and have tried apscheduler 3.x and 2.x

Still same result. Any help would be greatly appreciated!
Reply
#2
do you have file named apscheduler.py in the same folder where the file GroveWeatherPi.py is?
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
I do not, it is my understanding that apscheduler is an advanced scheduler for python and is installed using a repository. I guess I can try to install while in the directory, but I dont think it will install in the directory, it will just install in the default/root location

Error:
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ sudo pip install apscheduler Requirement already satisfied: apscheduler in /usr/local/lib/python2.7/dist-p ackages
Reply
#4
Sorry, the point was not to install it in the directory. It happen that people name files like packages they try to use and that file overshadow the package and thus the import error
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
not sure if it is any help, but below is the link to the github repo.

https://github.com/switchdoclabs/SDL_Pi_GroveWeatherPi
Reply
#6
at the moment I don't have other ideas. it says apscheduler is installed for python2, you run it with python2...
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  send repeated messages with apscheduler pylab 1 1,872 Jan-04-2020, 08:43 PM
Last Post: snippsat
  How can i use max_instances in apscheduler zebisnaga 0 2,532 Jul-21-2019, 11:17 PM
Last Post: zebisnaga
  How to convert Schedule to APScheduler module? penguin9 2 3,729 May-03-2018, 12:44 PM
Last Post: penguin9

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020