Skip to content

MSP430_Initialize() call fails in Python 3 #4

Description

@mventimi

The open() method in the MSP430Library class takes a string argument for the port. However, in Python 3 the call to MSP430_Initialize() requires a bytes argument, not a string argument. Changing this line:

status = MSP430_Initialize(port, ctypes.byref(version))

to this:

status = MSP430_Initialize(bytes(port, encoding='ascii'), ctypes.byref(version))

is one way to fix the problem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions