Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-8937

Python 3-requiring example scripts should provide better error msg for python 2 users

    XMLWordPrintable

Details

    • Bug
    • Status: Fixed
    • Medium
    • Resolution: Fixed
    • TIRTOS
    • TIRTOS-1506
    • 3.50.00
    • 3.60.00
    • Hide
      If a user ran the python-3-requiring networking scripts using python 2, they get an error message:

      Traceback (most recent call last):
      File "./packages/examples/tools/udpSendReceive.py", line 119, in <module>
      buffer[-1] = (~i).to_bytes(sizeNegI + 1, byteorder='big', signed=True)[-1]
      AttributeError: 'int' object has no attribute 'to_bytes'

      Scripts that require Python 3 now detect if they are using python 2 and gives a more obvious message instead.
      Show
      If a user ran the python-3-requiring networking scripts using python 2, they get an error message: Traceback (most recent call last): File "./packages/examples/tools/udpSendReceive.py", line 119, in <module> buffer[-1] = (~i).to_bytes(sizeNegI + 1, byteorder='big', signed=True)[-1] AttributeError: 'int' object has no attribute 'to_bytes' Scripts that require Python 3 now detect if they are using python 2 and gives a more obvious message instead.

    Description

      Python 3-requiring example scripts should provide better error msg for python 2 users

      Attachments

        Activity

          People

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: