|
Post by Tijo on Dec 14, 2017 7:17:16 GMT -8
i got everythink connected. The i2cdetect -y 1 gives the correct values.
sudo 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 -- -- -- -- -- -- -- --
when i run sudo python SmartPlantPi.py i got
Traceback (most recent call last): File "SmartPlantPi.py", line 32, in <module> import interpretButton File "/home/pi/Desktop/smartplant/SDL_Pi_SmartPlantPi/interpretButton.py", line 19, in <module> import Scroll_SSD1306 File "/home/pi/Desktop/smartplant/SDL_Pi_SmartPlantPi/Scroll_SSD1306.py", line 29, in <module> font = ImageFont.truetype('/usr/share/fonts/truetype/roboto/Roboto-Regular.ttf', 10) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 238, in truetype return FreeTypeFont(font, size, index, encoding) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 127, in __init__ self.font = core.getfont(font, size, index, encoding) IOError: cannot open resource
and when i run sudo python testAll.py i got
Traceback (most recent call last): File "testAll.py", line 32, in <module> import Scroll_SSD1306 File "/home/pi/Desktop/smartplant/SDL_Pi_SmartPlantPi/Scroll_SSD1306.py", line 29, in <module> font = ImageFont.truetype('/usr/share/fonts/truetype/roboto/Roboto-Regular.ttf', 10) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 238, in truetype return FreeTypeFont(font, size, index, encoding) File "/usr/lib/python2.7/dist-packages/PIL/ImageFont.py", line 127, in __init__ self.font = core.getfont(font, size, index, encoding) IOError: cannot open resource
any idea what causes the problem?
|
|
|
Post by SDL on Dec 17, 2017 16:04:25 GMT -8
Let's look at what version of the Raspbian operating system you are running:
do this from a company line window and post the results.
cat /etc/os-release
I'm just wondering if that is the problem.
BP
|
|
|
Post by tijo on Dec 28, 2017 1:06:14 GMT -8
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"
is there any limitations to the chosen rasbian version?
|
|
|
Post by SDL on Jan 2, 2018 8:11:26 GMT -8
I wonder if it is Stretch. I have a stretch system here in the office and will check it later today.
BP
|
|
|
Post by SDL on Jan 6, 2018 16:21:38 GMT -8
|
|
|
Post by scottaandy on Apr 26, 2018 10:40:59 GMT -8
All connected. The i2cdetect -y 1 gives the correct values.
sudo 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 -- -- -- -- -- -- -- --
and when I run sudo python testAll.py I got
pi@raspberrypi:~/SDL_Pi_SmartPlantPi $ sudo python testAll.py Traceback (most recent call last): File "testAll.py", line 94, in <module> rotary = SDL_Pi_RotaryButton.SDL_Pi_RotaryButton() File "./SDL_Pi_RotaryButton/SDL_Pi_RotaryButton.py", line 53, in __init__ GPIO.add_event_detect(SDL_Pi_RotaryButton_Enc_A,GPIO.RISING,callback=self.Enc_EventHandler) RuntimeError: Failed to add edge detection
and when I run sudo python SmartPlantPi.py
pi@raspberrypi:~/SDL_Pi_SmartPlantPi $ sudo python SmartPlantPi.py Traceback (most recent call last): File "SmartPlantPi.py", line 170, in <module> rotary = SDL_Pi_RotaryButton.SDL_Pi_RotaryButton() File "./SDL_Pi_RotaryButton/SDL_Pi_RotaryButton.py", line 53, in __init__ GPIO.add_event_detect(SDL_Pi_RotaryButton_Enc_A,GPIO.RISING,callback=self.Enc_EventHandler) RuntimeError: Failed to add edge detection
Raspberry Pi 3 the os release is:
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"
the SDL_Pi_SmartPlantPi version is March 20, 2018: Release Version 021
I'm a python newbie of sorts. I'm encountering a lot of syntax errors in the code from print functions not having () and numerous indentation and tab disparities. I've looked at githubs raw files and see the same errors. Help! Thanks.
|
|
|
Post by SDL on Apr 30, 2018 13:04:39 GMT -8
Which Raspberry Pi 3 are you using? The B or the B+?
This is a brand new error. We've never seen this. We are using Stretch on our test place.
The syntax error is a strange one. Are you running Python 2 or 3? And what version of Python are you running? We have no syntax errors when we download the software.
Thank you for your excellent report. We will check it out.
BP
|
|
val
New Member
Posts: 3
|
Post by val on May 2, 2018 11:49:09 GMT -8
hello, i get the same exact error as scottaandy.
the i2cdetect -y 1 command gives the expected results:
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: -- -- -- -- -- -- -- --
but when i type sudo python testAll.py i get the error:
Traceback (most recent call last): File "testAll.py", line 94, in <module> rotary = SDL_Pi_RotaryButton.SDL_Pi_RotaryButton() File "./SDL_Pi_RotaryButton/SDL_Pi_RotaryButton.py", line 53, in __init__ GPIO.add_event_detect(SDL_Pi_RotaryButton_Enc_A,GPIO.RISING,callback=self.Enc_EventHandler) RuntimeError: Failed to add edge detection
My raspbian version is:
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"
My python version:
Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516] on linux2 Type "help", "copyright", "credits" or "license" for more information.
and i have the raspberry pi 3 B
i have no knowledge of Python and i would like to demonstrate smartplantPi to my nephews asap. Please help.
|
|
|
Post by scottaandy1 on May 2, 2018 19:59:39 GMT -8
Running python3.5.3 on a Rpi 3B Lastest stopping point:
pi@raspberrypi:~/SDL_Pi_SmartPlantPi $ sudo python testAll.py Traceback (most recent call last): File "testAll.py", line 31, in <module> import Adafruit_SSD1306 File "./Adafruit_Python_SSD1306/Adafruit_SSD1306/__init__.py", line 1, in <module> from .SSD1306 import * File "./Adafruit_Python_SSD1306/Adafruit_SSD1306/SSD1306.py", line 25, in <module> import Adafruit_GPIO as GPIO ImportError: No module named 'Adafruit_GPIO' pi@raspberrypi:~/SDL_Pi_SmartPlantPi $
Because I'm very much a python newbie … does this mean I need to open up the file Adafruit_SSD1306/SSD1306.py and add the line:
import Adafruit_GPIO
|
|
val
New Member
Posts: 3
|
Post by val on May 2, 2018 23:41:19 GMT -8
are we the customers ourselves doing the python debugging now? i thought the code was supposed to work straight out-of-the-box, at least that's the impression i got from the amazon product description.
|
|
|
Post by scottaandy on May 3, 2018 8:16:10 GMT -8
Could I buy a microSD from you fully setup to run SmartPlantPi on the Raspberry Pi? I'm just reflecting along the thought, there are companies who sell the Raspberry Pi with a microSD already flashed with Raspbian/NOOBS so newbies start up quick and easily. I'm willing/wanting to buy a microSD that features plug-n-play ease with running the SmartPlantPi hardware. Is SwitchDoc willing to supply one or is there a source in the SmartPlantPi community who can?
|
|
|
Post by SDL on May 3, 2018 12:22:02 GMT -8
Val,
"are we the customers ourselves doing the python debugging now? i thought the code was supposed to work straight out-of-the-box, at least that's the impression i got from the amazon product description."
When you are dealing with a complex ecosystem like the Raspberry Pi (Stretch, Jessie, etc) with multiple types of hardware (PI3 B, Pi3B+, the Zero, ZeroW and others....), changes in the OS or hardware breaks the software.
SmartPlantPi works perfectly on our test systems, but there are dozens of things people can do to their system to break applications (like not install I2C for example). When they updated to the Stretch OS, it broke the software and we had to update.
It's a moving target.
What we have found is that with some tech support, we generally can help people figure out what is going on. We are going to look at this latest: GPIO.add_event_detect(SDL_Pi_RotaryButton_Enc_A,GPIO.RISING,callback=self.Enc_EventHandler) RuntimeError: Failed to add edge detection
during the next week. It looks like something is not installed (like the GPIO library) in the customers OS.
As soon as we can duplicate a problem, it's generally easy to fix. We haven't duplicated this, which makes us think it is a library.
BP
|
|
|
Post by SDL on May 3, 2018 12:23:53 GMT -8
Scotaandy,
That is a good suggestion. We are looking at getting an SD Card duplicator (way too slow on computers) and will consider adding a premaid image for our customers to buy. Won't be cheap (I'd guess we would have to charge at least $25) but it makes it easier!
Maybe we could build it with a bunch of our kits on it.
BP
|
|
val
New Member
Posts: 3
|
Post by val on May 26, 2018 18:48:43 GMT -8
Val, "are we the customers ourselves doing the python debugging now? i thought the code was supposed to work straight out-of-the-box, at least that's the impression i got from the amazon product description."When you are dealing with a complex ecosystem like the Raspberry Pi (Stretch, Jessie, etc) with multiple types of hardware (PI3 B, Pi3B+, the Zero, ZeroW and others....), changes in the OS or hardware breaks the software. SmartPlantPi works perfectly on our test systems, but there are dozens of things people can do to their system to break applications (like not install I2C for example). When they updated to the Stretch OS, it broke the software and we had to update. It's a moving target. any update on the moving target?
|
|
|
Post by SDL on May 29, 2018 10:13:20 GMT -8
We have ordered an SD duplicator and the project is on our list now! Great news.
BP
|
|