|
Post by brakow on Oct 15, 2018 6:39:24 GMT -8
Getting the following error when attempting to start, any help would be awesome!!
pi@raspberrypi:~ $ cd SDL_Pi_GroveWeatherPi/
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 $
|
|
|
Post by brakow on Oct 16, 2018 5:09:15 GMT -8
Update: Still having issues, googled a bunch on the error, have not found much. I have installed the repo's below. Still same error message.
pip install schedule
pip install apscheduler
Still getting the error below:
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 apscheduler.schedulers.background
|
|
|
Post by SDL on Oct 16, 2018 9:21:46 GMT -8
Brakow,
Please do the following and post:
cat /etc/os-release
and run this and post the response:
pip install apscheduler
BP
|
|
|
Post by brakow on Oct 16, 2018 9:37:26 GMT -8
pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@raspberrypi:~ $ pip install apscheduler
Collecting apscheduler
Using cached https://files.pythonhosted.org/packages/97/3a/fa3213cc325091b7729616594611fff31d72c2d4d590418c3efdf7424ae2/APScheduler-3.5.3-py2.py3-none-any.whl
Collecting funcsigs; python_version == "2.7" (from apscheduler)
Using cached https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Collecting tzlocal>=1.2 (from apscheduler)
Collecting setuptools>=0.7 (from apscheduler)
Using cached https://files.pythonhosted.org/packages/96/06/c8ee69628191285ddddffb277bd5abdf769166e7a14b867c2a172f0175b1/setuptools-40.4.3-py2.py3-none-any.whl
Collecting six>=1.4.0 (from apscheduler)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting pytz (from apscheduler)
Using cached https://files.pythonhosted.org/packages/30/4e/27c34b62430286c6d59177a0842ed90dc789ce5d1ed740887653b898779a/pytz-2018.5-py2.py3-none-any.whl
Collecting futures; python_version == "2.7" (from apscheduler)
Using cached https://files.pythonhosted.org/packages/2d/99/b2c4e9d5a30f6471e410a146232b4118e697fa3ffc06d6a65efde84debd0/futures-3.2.0-py2-none-any.whl
Installing collected packages: funcsigs, pytz, tzlocal, setuptools, six, futures, apscheduler
Successfully installed apscheduler-3.5.3 funcsigs-1.0.2 futures-3.2.0 pytz-2018.5 setuptools-40.4.3 six-1.11.0 tzlocal-1.5.1
pi@raspberrypi:~ $ cd SDL_Pi_GroveWeatherPi/
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 apscheduler.schedulers.background
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $
|
|
|
Post by brakow on Oct 18, 2018 6:24:46 GMT -8
I have also tried the following found in another forum:
I got same issue, but then I found,
I had installed apscheduler version 3 then I shifted to version 2.1.2 using,
pip uninstall apscheduler
pip install apscheduler==2.1.2
Just checkout before switching to version 2.1.2, If you wanted to use extra features added in version 3. In my case I didn't wanted much.
The issue still will not allow the software to start. Sill getting the error message below:
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ 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 $
|
|
|
Post by brakow on Oct 18, 2018 6:30:01 GMT -8
Just to see what happens, I commented out the following from the file and got the below output:
Commented out from GroveWeatherPi.py
#from apscheduler.schedulers.background import BackgroundScheduler
I then got the following output:
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $ sudo python GroveWeatherPi.py
Traceback (most recent call last):
File "GroveWeatherPi.py", line 375, in <module>
bmp280 = BMP280.BMP280()
File "./Adafruit_Python_BMP/Adafruit_BMP/BMP280.py", line 46, in __init__
self._device = i2c.get_i2c_device(address, **kwargs)
File "./Adafruit_Python_GPIO/Adafruit_GPIO/I2C.py", line 65, in get_i2c_device
busnum = get_default_bus()
File "./Adafruit_Python_GPIO/Adafruit_GPIO/I2C.py", line 57, in get_default_bus
raise RuntimeError('Could not determine default I2C bus for platform.')
RuntimeError: Could not determine default I2C bus for platform.
pi@raspberrypi:~/SDL_Pi_GroveWeatherPi $
Not sure if it helps at all, but I cannot figure this out. Any help would be greatly appreciated!! Chomping at the bit to use the weather station!
|
|
|
Post by brakow on Oct 21, 2018 9:39:07 GMT -8
Anyone having similar issues? Any suggestions. Have rebuilt/tried multiple times on both RPi3 and RPi0w
|
|
|
Post by SDL on Oct 23, 2018 12:49:57 GMT -8
Show us the start of the GWP software. Are you running the latest version?
This is a new error to us and it does not happen for us.
And the Apscheduler error does not show up either.
Have you updated/upgraded your version of stretch?
BP
|
|
|
Post by brakow on Oct 24, 2018 14:45:44 GMT -8
I have run: sudo apt-get update and sudo apt-get upgrade have also ran sudo apt-get dist-upgrade Not sure what you mean by show us the start of the GWP software?? I have posted numerous times what happens when I run GroveWeatherPi.py, I have also put the raspbian version output previously in this post. It is the most current full version of stretch and not stretch lite. If you mean the start of the GWP software as the code from GroveWeatherPi.py it is as follows: # # # GroveWeatherPi Solar Powered Weather Station # Version 3.02 June 19, 201 June 19, 201 June 19, 2018 June 19, 2018 June 19, 2$ # # SwitchDoc Labs # www.switchdoc.com# # # imports A little background perhaps... Started with a RPI 0w.... 64 GB SD card(Good SD card,not junk).... Formatted with SD-Formatter and installed Raspbian image with Win32installer... Fresh install of full raspbian stretch... Ran all updates and installed all pre reqs described in the Tutorial/walk-through. Ran through the walk-through... Got everything hooked up correctly and got the correct outputs with the test program. Then went to run the GWP software and got the same error with the apscheduler above. Thought maybe it was a memory issue with the Raspberry Pi 0. So I switched to a Raspberry Pi 3 Model B. Same process as mentioned with installing software above. Same error. Since then for testing purposes, I have left it all on the RPI3... So possibly something they left out of the repos for stretch that used to be in previous versions, but not anymore? Have you guys tested your software with a fresh install of stretch or was it an upgraded previous version of raspbian? I guess I could try a previous release then update/upgrade. Really have no clue where to go from here. Any help would be awesome!! Chomping at the bit to get this thing outside!
|
|
|
Post by SDL on Oct 25, 2018 16:22:52 GMT -8
Brakow,
Yes, we have used a new stretch image. We actually have one pre-installed on an SD Card on the store. GWP seems to work fine. I think this has to do with your I2C driver, I would guess.
Here is what we get on GWP on Stretch. Note we are using a WXLink so it is in a different configuration that you are using, but it still starts, reads the BMP280 and runs the scheduler.
BP
pi@switchdoclabs:~/SDL_Pi_GroveWeatherPi $ sudo python GroveWeatherPi.py >>>>>>>>>>>>>>>>>>><<<<<<<<<<< TCA9545 I2C Mux Not Present >>>>>>>>>>>>>>>>>>><<<<<<<<<<< deviceID = 0x1050 Error accessing 0x48: Check your I2C address Error accessing 0x48: Check your I2C address Type Error
GroveWeatherPi Solar Powered Weather Station Version 3.02 - SwitchDoc Labs
Program Started at:2018-10-25 17:21:07
---------------------- I2C Mux - TCA9545: Not Present BMP280: Present DS3231: Not Present HDC1080: Present HTU21DF: Not Present AM2315: Not Present ADS1015: Not Present ADS1115: Not Present AS3935: Not Present OLED: Not Present SunAirPlus: Not Present Sunlight Sensor: Not Present WXLink: Present
UseMySQL: Present Check WLAN: Present WeatherUnderground: Not Present ---------------------- sendmail exception raised ----------------- Scheduled Jobs ----------------- Jobstore default: sampleAndDisplay (trigger: interval[0:00:10], next run at: 2018-10-25 17:21:20 PDT) patTheDog (trigger: interval[0:00:10], next run at: 2018-10-25 17:21:20 PDT) tick (trigger: interval[0:01:00], next run at: 2018-10-25 17:22:10 PDT) sampleWeather (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) sampleSunAirPlus (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) writeWeatherRecord (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) writePowerRecord (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) updateRain (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) checkForShutdown (trigger: interval[0:05:00], next run at: 2018-10-25 17:26:10 PDT) sampleWeather (trigger: interval[0:15:00], next run at: 2018-10-25 17:36:10 PDT) sampleSunAirPlus (trigger: interval[0:15:00], next run at: 2018-10-25 17:36:10 PDT) doAllGraphs (trigger: interval[0:15:00], next run at: 2018-10-25 17:36:10 PDT) WLAN_check (trigger: interval[0:30:00], next run at: 2018-10-25 17:51:10 PDT) rebootPi (trigger: cron[day='2-30/2', hour='0', minute='4'], next run at: 2018-10-26 00:04:00 PDT) ----------------- ----------------- WXLink Remote WeatherRack Weather Sensors Sampling ----------------- ----------- block1= [171, 102, 31, 132, 149, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ------Patting The Dog------- 0, 56, 65, 51, 51, 85] block2= [66, 29, 90, 100, 64, 51, 51, 135, 66, 204, 204, 28, 66, 236, 81, 120, 64, 204, 204, 204, 62, 0, 0, 0, 0, 217, 37, 0, 0, 42, 236, 0] ----------- block 1 ab661f84951b0000000000000000000000000000000000000000003841333355 block 2 421d5a644033338742cccc1c42ec517840cccccc3e00000000d92500002aec00 ----------- ReversedreceivedCRC= 2aec length of stb1+sb2= 59 ab661f84951b0000000000000000000000000000000000000000003841333355 421d5a644033338742cccc1c42ec517840cccccc3e00000000d925 calculatedCRC = 2aec Good CRC Recived Rain Total= 0.00 in Wind Speed= 0.00 MPH Wind Direction= 0 Degrees OTFloat=003841 AM2315 from WXLink temperature: 11.5C AM2315 from WXLink humidity: 53.3% WXLink batteryVoltage = 3.57 WXLink batteryCurrent = 67.60 WXLink loadCurrent = 39.20 WXLink solarPanelVoltage = 3.88 WXLink solarPanelCurrent = 0.40 WXLink auxA = 0.00 WXLink Message ID 9689 WXLink_Data_Fresh set to True SCL= 1 outsideTemperature: 11.5 C outsideHumidity: 53.3 % Rain Total= 0.00 in Rain Last 60 Minutes= 0.00 in Wind Speed= 0.00 MPH MPH wind_gust= 0.00 MPH ----------------- ----------------- DS3231 Real Time Clock Not Present ----------------- ----------------- BMP280 Barometer ----------------- Temperature = 24.00 C Pressure = 94.65 KPa Altitude = 570.81 m Sealevel Pressure = 102.27 KPa ----------------- ----------------- Sunlight Vi/IR/UV Sensor Not Present -----------------
|
|
|
Post by brakow on Oct 26, 2018 10:48:22 GMT -8
I have ordered the SD card from switchdoc, just waiting for it to ship. When you say I2C driver, is that a software repo, or the board itself?
|
|
|
Post by brakow on Oct 31, 2018 7:49:27 GMT -8
Just a quick update. Upon using the Noob build of stretch everything came alive and all works well. For anyone having any of these issues, I suggest you use the noob build of raspbian. Will save yourself a lot of headache!!
|
|
|
Post by SDL on Nov 1, 2018 8:05:59 GMT -8
Brakow,
Interesting observation. We used the NOOB build of Stretch to generate our base SD Card image. You may have figured out the difference.
I2C we are are talking about making sure you have installed the I2C drivers for the OS, which are disabled by default.
BP
|
|
|
Post by brakow on Nov 2, 2018 7:22:17 GMT -8
I will have to admit, it only came to me upon receiving the SD card from SwitchDoc. I noticed in the startup of the card that it was the Noob version. Putting so much effort in to "My Build" I could not let it rest and just use the Switchdoc Card. So I used and installed NOOB, and everything came to life! So thanks again for you help and thanks to SwitchDoc!
Yes the I2C drivers were enabled.
|
|
|
Post by shawnzyoo on Nov 3, 2018 21:55:48 GMT -8
Shoot I just received my Weather kit and just hit this same issue. Fresh Stretch Install on a RPi3.
-------
GroveWeatherPi Solar Powered Weather Station Version 3.02 - SwitchDoc Labs
Program Started at:2018-11-03 22:53:35
---------------------- I2C Mux - TCA9545: Present BMP280: Present DS3231: Present HDC1080: Present HTU21DF: Not Present AM2315: Present ADS1015: Not Present ADS1115: Present AS3935: Present OLED: Present SunAirPlus: Not Present Sunlight Sensor: Not Present WXLink: Not Present
UseMySQL: Present Check WLAN: Present ---------------------- as3935 Interrupt Traceback (most recent call last): File "GroveWeatherPi.py", line 1762, in <module> scheduler = BackgroundScheduler() File "/usr/local/lib/python2.7/dist-packages/apscheduler/schedulers/base.py", line 83, in __init__ self.configure(gconfig, **options) File "/usr/local/lib/python2.7/dist-packages/apscheduler/schedulers/base.py", line 122, in configure self._configure(config) File "/usr/local/lib/python2.7/dist-packages/apscheduler/schedulers/background.py", line 29, in _configure super(BackgroundScheduler, self)._configure(config) File "/usr/local/lib/python2.7/dist-packages/apscheduler/schedulers/base.py", line 694, in _configure self.timezone = astimezone(config.pop('timezone', None)) or get_localzone() File "/usr/local/lib/python2.7/dist-packages/tzlocal/unix.py", line 131, in get_localzone _cache_tz = _get_localzone() File "/usr/local/lib/python2.7/dist-packages/tzlocal/unix.py", line 70, in _get_localzone return pytz.timezone(etctz.replace(' ', '_')) File "/usr/local/lib/python2.7/dist-packages/pytz/__init__.py", line 178, in timezone raise UnknownTimeZoneError(zone) pytz.exceptions.UnknownTimeZoneError: 'US/Pacific-New'
|
|