0

Import Error at IO Smart Planter
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Import Error at IO Smart Planter

by berkozz on Fri May 28, 2021 9:10 am

adafruit_support_carter wrote:Hmmm. A Titano shouldn't have any issues with that code. Just to be sure, this is the code you are trying to run?
https://learn.adafruit.com/pyportal-pet ... code-setup

What should I do now ?

berkozz
 
Posts: 12
Joined: Mon May 10, 2021 8:08 am

Re: Import Error at IO Smart Planter

by adafruit_support_carter on Fri May 28, 2021 10:32 am

We are taking a look at this. It seems like something has changed to where the code no longer has the required space. The guide author has been notified and we'll respond back here when we figure it out.

adafruit_support_carter
 
Posts: 21122
Joined: Tue Nov 29, 2016 2:45 pm

Re: Import Error at IO Smart Planter

by berkozz on Mon May 31, 2021 4:06 am

adafruit_support_carter wrote:We are taking a look at this. It seems like something has changed to where the code no longer has the required space. The guide author has been notified and we'll respond back here when we figure it out.

ok thank you ^^

berkozz
 
Posts: 12
Joined: Mon May 10, 2021 8:08 am

Re: Import Error at IO Smart Planter

by jackyt1 on Wed Jun 02, 2021 3:19 am

Hello Berkozz
the problem seems to come from the large size of the background image: "roots.bmp": 151kb.
If you remove it it works (NB: the code includes this exception, so there will be no error)

jackyt1
 
Posts: 2
Joined: Sat May 29, 2021 4:28 pm

Re: Import Error at IO Smart Planter

by berkozz on Wed Jun 02, 2021 7:22 am

jackyt1 wrote:Hello Berkozz
the problem seems to come from the large size of the background image: "roots.bmp": 151kb.
If you remove it it works (NB: the code includes this exception, so there will be no error)

Thanks a lot , it worked :) I don't know why it's so hard , but now I have connection problem :( I'm sure it's true username
code.py output:
No SD card found: no SD card
drawing background..
loading fonts...
loading icons...
Connected to WiFi!
Traceback (most recent call last):
File "code.py", line 189, in <module>
KeyError: aio_user

Code done running.

berkozz
 
Posts: 12
Joined: Mon May 10, 2021 8:08 am

Re: Import Error at IO Smart Planter

by jackyt1 on Wed Jun 02, 2021 8:52 am

It is necessary to put this information in 'secrets.py' file
secrets = {
'ssid' : 'xxxx',
'password' : 'xxxx,
'timezone' : "Europe/Brussels", # http://worldtimeapi.org/timezones
'github_token' : 'fawfj23rakjnfawiefa',
'hackaday_token' : 'h4xx0rs3kret',
'aio_user' : 'HERE',
'aio_key' : 'HERE,
}
NB: don't forget to create the feeds "moisture" and "temperature" in https://io.adafruit.com/

jackyt1
 
Posts: 2
Joined: Sat May 29, 2021 4:28 pm

Re: Import Error at IO Smart Planter

by berkozz on Sun Jun 06, 2021 8:29 am

jackyt1 wrote:It is necessary to put this information in 'secrets.py' file
secrets = {
'ssid' : 'xxxx',
'password' : 'xxxx,
'timezone' : "Europe/Brussels", # http://worldtimeapi.org/timezones
'github_token' : 'fawfj23rakjnfawiefa',
'hackaday_token' : 'h4xx0rs3kret',
'aio_user' : 'HERE',
'aio_key' : 'HERE,
}
NB: don't forget to create the feeds "moisture" and "temperature" in https://io.adafruit.com/


Sir thank you so much ^^ It's working now ! :))

berkozz
 
Posts: 12
Joined: Mon May 10, 2021 8:08 am

Re: Import Error at IO Smart Planter

by brubell on Wed Jun 30, 2021 3:14 pm

We've fixed this by compressing the sizes of the image and .wav files. We've also removed the IO+ header from the bundle as I think people were placing it into their device's filesystem by mistake.

https://github.com/adafruit/Adafruit_Le ... /pull/1589

brubell
 
Posts: 1513
Joined: Fri Jul 17, 2015 10:33 pm

Please be positive and constructive with your questions and comments.