Finding out what errorcodes means

  • Hello! We're running this code:

    except Exception as err:
        print("Error... ", err)
        f = open('/flash/log.txt', 'a+')
        print("writing to log file...")
        f.write(str(err) + "\n")
        print("close file...")

    And we're getting these error codes written to log.txt:
    We don't know what they mean, is there any way of finding out?

  • @jhn

    try to use

    sys.print_exception(err, f)

    instead of


    This will show you the stack trace as well and the error text

Log in to reply

Pycom on Twitter