Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Software reliability

    Scheduled Pinned Locked Moved GPy
    gpynetworklte
    4 Posts 3 Posters 303 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • K Offline
      kjm
      last edited by kjm

      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()
      
      robert-hhR C 2 Replies Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @kjm
        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.

        1 Reply Last reply Reply Quote 0
        • C Offline
          crumble @kjm
          last edited by

          @kjm

          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
          • ...
          1 Reply Last reply Reply Quote 0
          • K Offline
            kjm
            last edited by

            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.

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom