|
Post by faltek on Nov 23, 2017 19:56:53 GMT -8
Hi !
Got my new SmartPlantPi kit ! Really great !
Did search the forum, but no luck, trying with a new Thread !
- Hardware installation was fine, everything works ( blue led and small withe leds flashing while entering python commands) - All package up to date dans upgraded, including python pip and pil
sudo pip install pil returned this :
Collecting pil Could not find a version that satisfies the requirement pil (from versions: )
No matching distribution found for pil
i find by myself the font error ( roboto font )... but i'm new to python and encounter this problem :
pi@SmartPlantPi:~/Adafruit_Python_GPIO/SDL_Pi_SmartPlantPi $ sudo python testAll.py Traceback (most recent call last):
File "testAll.py", line 149, in <module>
ads1115 = ADS1x15(ic=ADS1115, address=0x48)
TypeError: 'module' object is not callable
pi@SmartPlantPi:~/Adafruit_Python_GPIO/SDL_Pi_SmartPlantPi $
Tried different solution, but nothing worked. The small white led on the ADS1115 is flashing one time while starting the testAll.py, so i think that the harware is working and wiring is good.
Could anybody help me with this one ?
Thanks !
|
|
SeanJ
New Member
Posts: 6
Raspberry Pi: Yes
|
Post by SeanJ on Nov 24, 2017 6:09:52 GMT -8
Hey faltek, what is the result of your i2cdetect? can you post it?
i2cdetect -y 1
|
|
|
Post by faltek on Nov 24, 2017 7:19:07 GMT -8
Hi !
Sorry i shoud have posted already, everything seems fine !
pi@SmartPlantPi:~ $ i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
|
|
|
Post by faltek on Nov 24, 2017 7:20:01 GMT -8
Haa... better in this format :
pi@SmartPlantPi:~ $ i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --
40: 40 -- -- -- -- -- -- -- 48 -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
|
|
|
Post by SDL on Nov 24, 2017 9:12:07 GMT -8
faltek,
We found and nailed this bug a couple of days agp. Download the latest version of SmartPlantPi and it will work!
The operating system changed and broke the libraries. Irritating. Fixed now!
BP
|
|
|
Post by faltek on Dec 3, 2017 13:57:47 GMT -8
HI ! Just a fast update :
The problem was not present in SmartPlantPi.py... it was only in testAll.py. I just looked for difference between the 2 codes and found the problems.
Change those line in testAll.py :
line 25 sys.path.append('./SDL_Pi_Grove4Ch16BitADC/SDL_Adafruit_ADS1x15') Line 36 from SDL_Adafruit_ADS1x15 import ADS1x15 and you should be good to go.
|
|
|
Post by SDL on Dec 4, 2017 8:56:10 GMT -8
Phhht. Thank you! We will change the code to reflect your fix.
BP
|
|
|
Post by faltek on Dec 4, 2017 17:07:17 GMT -8
I'm not a coder, so it's an accomplishment for me ! Buyed this kit to learn coding, so happy to push things that i've found !
|
|
|
Post by SDL on Dec 5, 2017 7:56:17 GMT -8
Fix uploaded to GitHub. Thank you Faltek!
BP
|
|
|
Post by galewinston on Jan 28, 2020 21:00:56 GMT -8
TypeError: 'module' object is not callable
This error statement TypeError: 'module' object is not callable is raised as you are being confused about the Class name and Module name. The problem is in the import line . You are importing a module, not a class. This happend because the module name and class name have the same name . If you have a class MyClass in a file called MyClass.py , then you should write: from MyClass import MyClass
|
|