libftdi Archives

Subject: RE: ftdi.write_data doesn’t work with some python3 unicode strings

From: "Chris Brackert" <cbrackert@xxxx>
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Cc: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 30 Oct 2015 08:59:31 -0700 (PDT)
I apologize that I haven't been able to test with Python 2. I'm on vacation and without a computer until Monday. I will check then.



On Fri, Oct 30, 2015 at 3:57 AM, Michel Zou <xantares09@xxxxxxxxxxx> wrote:

Hi,
Thomas, I think you can apply this patch even if Chris doesn't answer.
M.


From: xantares09@xxxxxxxxxxx
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Subject: RE: ftdi.write_data doesn’t work with some python3 unicode strings
Date: Tue, 27 Oct 2015 10:33:34 +0000

Hi,
Glad it worked, could you test with python 2 ?
The method was not prepared for Python at all, and that length argument was not deduced from the object passed.
M.


Date: Mon, 26 Oct 2015 16:45:52 -0700
From: cbrackert@xxxx
To: libftdi@xxxxxxxxxxxxxxxxxxxxxxx
CC: xantares09@xxxxxxxxxxx
Subject: Re: Re: ftdi.write_data doesn’t work with some python3 unicode strings

The patch is working great. Thanks guys! The dumb workaround that I was using meant calling the library with python 3 unicode strings, but once I updated those to bytes everything worked.

The code I’m working with used to call ftdi.write_data with a third parameter for “length” but now that is not allowed. Was that unnecesarry to begin with?


On Fri, Oct 23, 2015 at 5:16 PM, Chris Brackert <cbrackert@xxxx> wrote:

I need to get my test hardware setup again. I should be able to get to this early next week and then I will report back. Thanks!


On Fri, Oct 23, 2015 at 4:22 AM, Thomas Jarosch <thomas.jarosch@xxxxxxxxxxxxx> wrote:

Hi Chris,

On Friday, 16. October 2015 13:40:41 Thomas Jarosch wrote:
> > I know this fix is not the proper way to do this but it is working for
> > me. Can you please investigate this issue and fix the library to work
> > with all python3 strings?

please test the fix Michel provided and let me know if it works for you.

Thanks,
Thomas


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx






libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx



libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx





libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx


Current Thread