🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    How do I get the exception details in UIFlow?

    UIFlow
    5
    8
    9.4k
    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.
    • G
      Go.Ozeki
      last edited by

      Hi all,

      I am using UIFlow.
      I want to get the detailed contents of the exception when it occurs.
      Using the try~except block, I can define the behavior when an exception occurs, but I cannot get the details of the exception.
      Is there any way to get the details of the exception?

      Thank you for help.

      1 Reply Last reply Reply Quote 0
      • R
        robalstona
        last edited by

        try:
          # some code
        except Exception as e
          # print to serial console
          print( str(e) )
          # or store in variable
        

        If you connect device trought usb, you could see all output in serial terminal.

        1 Reply Last reply Reply Quote 0
        • ajb2k3A
          ajb2k3
          last edited by

          There isn't a console for capturing exceptions in UIFLow, I use the Thonny IDE and run a console in that to capture errors and exceptions.

          UIFlow, so easy an adult can learn it!
          If I don't know it, be patient!
          I've ether not learned it or am too drunk to remember it!
          Author of the WIP UIFlow Handbook!
          M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

          stanelyS D 2 Replies Last reply Reply Quote 1
          • G
            Go.Ozeki
            last edited by

            I decided to use TeraTerm to refer to the COM port information.
            When an Exception occurred, the detailed information was displayed in TeraTerm.
            Don't forget to set the Baud rate to 115200 for TeraTerm!

            The attached image shows the Exception displayed when I tried to connect to IoT Central without connecting to Wi-Fi.

            Thank you for help.

            0_1636334242899_c385a81a-18d2-431a-ba6c-0d0c7b93ee16-image.png

            D 1 Reply Last reply Reply Quote 1
            • stanelyS
              stanely @ajb2k3
              last edited by

              @ajb2k3 That's a great tip! It's also a good way to quick debug the code using REPL.

              1 Reply Last reply Reply Quote 1
              • D
                dave17 @Go.Ozeki
                last edited by

                @go-ozeki said in How do I get the exception details in UIFlow?:

                TeraTerm
                Hi how do you connect TeraTerm to uniflow? I'm using Uniflow both online and desktop (under linux) but I don't see how to get the console, if I use screen /dev/ttyUSB0 I get the serial output but then uniflow does not work anymore, I do you get both?

                1 Reply Last reply Reply Quote 0
                • D
                  dave17 @ajb2k3
                  last edited by

                  @ajb2k3
                  Hi I tried to connect Thonny to my M5stack Core 2 but with no success, I when I set the port to esp32 and /dev/USB0 I get some serial port messages but the device is not recognized and I cannot program it with Thonny. Same with mu.
                  Can you please help?

                  ajb2k3A 1 Reply Last reply Reply Quote 0
                  • ajb2k3A
                    ajb2k3 @dave17
                    last edited by

                    @dave17 said in How do I get the exception details in UIFlow?:

                    @ajb2k3
                    Hi I tried to connect Thonny to my M5stack Core 2 but with no success, I when I set the port to esp32 and /dev/USB0 I get some serial port messages but the device is not recognized and I cannot program it with Thonny. Same with mu.
                    Can you please help?

                    What kind of messages?
                    Have you set Thonny or mu to communicate correctly?
                    Have you Hit CTRL+C to stop the running Micropython code in order to to get into REPL?

                    UIFlow, so easy an adult can learn it!
                    If I don't know it, be patient!
                    I've ether not learned it or am too drunk to remember it!
                    Author of the WIP UIFlow Handbook!
                    M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post