Can anyone explain to me why
from network import LTE; lte=LTE()
would be more reliable & less like to generate a
NameError: name 'lte' is not defined
later in the program than
import network; lte=network.LTE()
I think I might have a flash memory problem, something that has haunted me with GPYs from the getgo. If I upload then remove then upload boot.py & main.py several times I seem to get a more stable system. It's like the first write of new software is not enough.
Hard to tell without more details.
Do you import all your stuff at the beginning or somewhere inside the script?
- do you really reach the declaraiont path?
- have you checked for try/catch?
- checked memory fragmentation?
- checked that callbacks will be handeled only after the declaration
robert-hh last edited by
@kjm There is no difference between the two options. If you see one, check whether there is a difference in the scope of lte symbol, like global vs. local. A global symbol can be seen everywhere in the code, but creation or assignment in a function or class is local, unless you define it explicitly as global.