|
Post by s0urkraut86 on Mar 4, 2019 12:26:16 GMT -8
Hello,
I think i tried from like 5 different adafruit sources and the included SDL_Adafruit_ADS1x15 directory as well. for the life of me i am still getting an error saying No module named SDL_Adafruit_ADS1x15 when trying to run
:/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ python SDL_Pi_WeatherRackTest.py . Is there something i am missing? here are my results. pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ python SDL_Pi_WeatherRackTest.py
Traceback (most recent call last):
File "SDL_Pi_WeatherRackTest.py", line 22, in <module>
import SDL_Pi_WeatherRack as SDL_Pi_WeatherRack
File "/home/pi/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/SDL_Pi_WeatherRack.py", line 33, in <module>
from SDL_Adafruit_ADS1x15 import ADS1x15
ImportError: No module named SDL_Adafruit_ADS1x15
Lannie.
|
|
|
Post by SDL on Mar 4, 2019 16:39:49 GMT -8
Lannie, Boy, I wonder how nobody has told us this! You are missing two directories that are in the previous version of this product drivers. git clone github.com/switchdoclabs/SDL_Pi_Weather_80422.gitThen move the Adafruit_ADS1x15 directory and the Adafruit_I2C directory into the same directory as "SDL_Pi_WeatherRackTest.py" Our fault. BP
|
|
|
Post by s0urkraut86 on Mar 4, 2019 17:07:01 GMT -8
BP,
to clarify
git clone github.com/switchdoclabs/SDL_Pi_Weather_80422.git into the main directory of SDL_Pi_GroveWeatherPi?
and move not copy SDL_Adafruit_ADS1x15 and Adafruit_I2C into SDL_Pi_WeatherRack from the above repo or the one thats already in SDL_PiGroveWeatherPi?
Thanks, Lannie
|
|
|
Post by s0urkraut86 on Mar 4, 2019 17:20:26 GMT -8
BP,
looks like i still have the error, i did what you said and the steps show this below.
pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_Weather_80422 $ mv Adafruit_ADS1x15 ~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_Weather Rack/ pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_Weather_80422 $ mv Adafruit_I2C/ ~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRac k/ pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_Weather_80422 $ ls README.md SDL_Pi_Weather_80422.py SDL_Pi_Weather_80422Test.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_Weather_80422 $ cd .. pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi $ ls Adafruit_I2C doAllGraphs.py README.md SDL_Pi_INA3221 startserver.sh testSI1145.py Adafruit_Python_BMP graphs RTC_SDL_DS3231 SDL_Pi_SI1145 state updateBlynk.py Adafruit_Python_GPIO GroveWeatherPi.py Scroll_SSD1306.py SDL_Pi_SSD1306 state.py util.py Adafruit_Python_SSD1306 htu21dflib SDL_Adafruit_ADS1x15 SDL_Pi_TCA9545 static WeatherPiSQL config.py MySQLFiles SDL_Pi_AM2315 SDL_Pi_Weather_80422 testAM2315.py WeatherUnderground.py config.pyc pclogging.py SDL_Pi_FRAM SDL_Pi_WeatherRack testAS3935.py crcpython2.py RaspberryPi-AS3935 SDL_Pi_HDC1000 sendemail.py testBlynk.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi $ cd SDL_Pi_WeatherRack/ pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ ls Adafruit_ADS1x15 NoWPAConfig.py README.md SDL_Pi_WeatherRack.pyc Adafruit_I2C NoWPAConfig.pyc SDL_Pi_WeatherRack.py SDL_Pi_WeatherRackTest.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ python SDL_Pi_WeatherRackTest.py Traceback (most recent call last): File "SDL_Pi_WeatherRackTest.py", line 22, in <module> import SDL_Pi_WeatherRack as SDL_Pi_WeatherRack File "/home/pi/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/SDL_Pi_WeatherRack.py", line 33, in <module> from SDL_Adafruit_ADS1x15 import ADS1x15 ImportError: No module named SDL_Adafruit_ADS1x15 pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ ls Adafruit_ADS1x15 NoWPAConfig.py README.md SDL_Pi_WeatherRack.pyc Adafruit_I2C NoWPAConfig.pyc SDL_Pi_WeatherRack.py SDL_Pi_WeatherRackTest.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ cd Adafruit_ADS1x15/ pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/Adafruit_ADS1x15 $ ls Adafruit_ADS1x15.py Adafruit_I2C.py ads1x15_ex_comparator.py ads1x15_ex_differential.py ads1x15_ex_singleended.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/Adafruit_ADS1x15 $ cd .. pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ ls Adafruit_ADS1x15 NoWPAConfig.py README.md SDL_Pi_WeatherRack.pyc Adafruit_I2C NoWPAConfig.pyc SDL_Pi_WeatherRack.py SDL_Pi_WeatherRackTest.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack $ cd Adafruit_I2C/ pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/Adafruit_I2C $ ls Adafruit_I2C.py pi@raspberrypi:~/git/SDL_Pi_GroveWeatherPi/SDL_Pi_WeatherRack/Adafruit_I2C $
|
|
|
Post by SDL on Mar 5, 2019 11:57:36 GMT -8
If you are going to run the files under the WeatherRack directory, the Adafruit files need to be in that directory. Look at the sys.append in the source file for the test.
BP
|
|
|
Post by s0urkraut86 on Mar 5, 2019 15:22:19 GMT -8
i have put those folders in the weatherack directory. do you mean take the files from the folders and pout them in the same directory as the WeatherRackTest.py. Is there another place i should be testing the weather rack?
sys.path.append('../Adafruit_ADS1x15') means its looking for the module in a folder called Adafruit_ADS1x15 sys.path.append('../')
ok the error was looking for the folder SDL_Adafruit_ADS1x15 not Adafruit_ADS1x15. i copied the SDL_Adafruit_ADS1x15 folder to the weatherrack script and it worked.
SDL_Pi_WeatherRack Library WeatherRack Weather Sensors ----------------- Rain Total= 0.00 in Wind Speed= 3.27 MPH max Ever Wind Speed= 3.27 MPH MPH wind_gust= 25.26 MPH max Ever Gust wind_gust= 25.26 MPH Wind Direction= 180.00 Degrees Wind Direction Voltage= 1.430 V -----------------
|
|
|
Post by SDL on Mar 6, 2019 6:16:06 GMT -8
Good deal!
BP
|
|